* SUMMARY console namespace breaks putting properties on console.__proto__ Regression with r200350. Console moved to a vanilla namespace object. So console.__proto__ used to be be ConsolePrototype (with log, warn, ... functions) but is now Object.prototype as those functions are on the console object itself. * STEPS TO REPRODUCE 1. Open http://www.macupdate.com/app/mac/25347/phoneview 2. Attempt to click the "More..." link => Does not work. Issues in console on page load. * NOTES - Page adds property to console.__proto__ which is now Object.prototype. http://www.macupdate.com/js/_sources/compressed/mu.utils.min.js (pretty printed) 111: }, console.__proto__.debug = function(format) { 112: if (window.DEBUG) { 113: var varargs = Array.prototype.slice.call(arguments); 114: console.__proto__.info.apply(this, varargs) 115: } 116: } - Causes issues later on iterating a vanilla object, which was unexpected. for (var p in {}) console.log(p); // "debug"
<rdar://problem/26250526>
Created attachment 279088 [details] [PATCH] Proposed Fix - DeprecatedConsolePrototype emits warnings
Attachment 279088 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h:45: The parameter name "message" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 17 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 279089 [details] [PATCH] Proposed Fix - Simple Approach
Here are two approaches (I forgot CMakeLists.txt in the first patch). 1. DeprecatedConsolePrototype - Make console.__proto__ a new vanilla object. - emits a console warning when pages put properties on console.__proto__ to move developers away from using it. 2. Simple Approach - Make console.__proto__ a new vanilla object.
Created attachment 279091 [details] [PATCH] Proposed Fix - DeprecatedConsolePrototype emits warnings
Attachment 279091 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h:45: The parameter name "message" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 279093 [details] [PATCH] Proposed Fix - Simple Approach
Comment on attachment 279093 [details] [PATCH] Proposed Fix - Simple Approach Attachment 279093 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1334378 Number of test failures exceeded the failure limit.
Created attachment 279098 [details] Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 279093 [details] [PATCH] Proposed Fix - Simple Approach View in context: https://bugs.webkit.org/attachment.cgi?id=279093&action=review > Source/JavaScriptCore/runtime/JSGlobalObject.cpp:201 > + // FIXME: <https://webkit.org/b/157782> console namespace breaks putting properties on console.__proto__ > + // Give console namespace a basic prototype object to avoid backwards compatibility issues from when > + // there used to be a console.__proto__ before it became a namespace object. I don't think we want a FIXME here. A FIXME should indicate a definite change we expect to make in the future. But we don't have any plan to change here. I would remove this comment.
Comment on attachment 279093 [details] [PATCH] Proposed Fix - Simple Approach r=me EWS failure seems spurious.
Landed Simple Approach: <http://trac.webkit.org/changeset/201022>