Web Inspector: ASSERT expanding objects in console PrimitiveBindingTraits<T>::assertV...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jan 2015 01:03:15 +0000 (01:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jan 2015 01:03:15 +0000 (01:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140746

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-21
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
Do not add impure properties to the descriptor object that will
eventually be sent to the frontend.

LayoutTests:

* TestExpectations:
Unskip the test now that is doesn't ASSERT in debug builds.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178875 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InjectedScriptSource.js

index f0a798b3c2b66a474b80465c4e1a771e2ca2d727..306aac3258b0edc8953d15ee205542c3547c4be9 100644 (file)
@@ -1,3 +1,13 @@
+2015-01-21  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ASSERT expanding objects in console PrimitiveBindingTraits<T>::assertValueHasExpectedType
+        https://bugs.webkit.org/show_bug.cgi?id=140746
+
+        Reviewed by Timothy Hatcher.
+
+        * TestExpectations:
+        Unskip the test now that is doesn't ASSERT in debug builds.
+
 2015-01-21  Daniel Bates  <dabates@apple.com>
 
         Update iOS WebKit2 expected results for compositing tests
index 11db65871ebeda85c6ce8fcdbfe641ff15ef7148..985b2af429c49257641ee9798080c9206c779db0 100644 (file)
@@ -454,5 +454,3 @@ webkit.org/b/139840 fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html
 webkit.org/b/140043 [ Debug ] js/dom/Promise.html [ Pass Failure ]
 
 webkit.org/b/140309 css3/background/background-repeat-space-content.html [ ImageOnlyFailure ]
-
-webkit.org/b/137306 inspector/model/remote-object-get-properties.html [ Skip ]
index 96118be30fd80724b3b2d407c8d11e3c44add3bd..ca0383bb6c408f9cc710db33a0bb8395ce77be21 100644 (file)
@@ -1,3 +1,14 @@
+2015-01-21  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: ASSERT expanding objects in console PrimitiveBindingTraits<T>::assertValueHasExpectedType
+        https://bugs.webkit.org/show_bug.cgi?id=140746
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/InjectedScriptSource.js:
+        Do not add impure properties to the descriptor object that will
+        eventually be sent to the frontend.
+
 2015-01-21  Matthew Mirman  <mmirman@apple.com>
 
         Updated split such that it does not include the empty end of input string match.
index 93f9ba9b58af82b255eb39a619edabf080d6ef3b..2b15c10e531c98c9e0c462b2a5d5530e64c9f7e4 100644 (file)
@@ -488,7 +488,7 @@ InjectedScript.prototype = {
         function createFakeValueDescriptor(name, descriptor, isOwnProperty)
         {
             try {
-                return {name: name, value: object[name], writable: descriptor.writable, configurable: descriptor.configurable, enumerable: descriptor.enumerable};
+                return {name: name, value: object[name], writable: descriptor.writable || false, configurable: descriptor.configurable || false, enumerable: descriptor.enumerable || false};
             } catch (e) {
                 var errorDescriptor = {name: name, value: e, wasThrown: true};
                 if (isOwnProperty)
@@ -497,7 +497,7 @@ InjectedScript.prototype = {
             }
         }
 
-        function processDescriptor(descriptor, isOwnProperty)
+        function processDescriptor(descriptor, isOwnProperty, possibleNativeBindingGetter)
         {
             // Own properties only.
             if (ownProperties) {
@@ -514,7 +514,7 @@ InjectedScript.prototype = {
                 } else if (descriptor.hasOwnProperty("get") && descriptor.get) {
                     // Getter property in the prototype chain. Create a fake value descriptor.
                     descriptors.push(createFakeValueDescriptor(descriptor.name, descriptor, isOwnProperty));
-                } else if (descriptor.possibleNativeBindingGetter) {
+                } else if (possibleNativeBindingGetter) {
                     // Possible getter property in the prototype chain.
                     descriptors.push(descriptor);
                 }
@@ -548,8 +548,7 @@ InjectedScript.prototype = {
                     // Developers may create such a descriptors, so we should be resilient:
                     // var x = {}; Object.defineProperty(x, "p", {get:undefined}); Object.getOwnPropertyDescriptor(x, "p")
                     var fakeDescriptor = createFakeValueDescriptor(name, descriptor, isOwnProperty);
-                    fakeDescriptor.possibleNativeBindingGetter = true; // Native bindings.
-                    processDescriptor(fakeDescriptor, isOwnProperty);
+                    processDescriptor(fakeDescriptor, isOwnProperty, true);
                     continue;
                 }