WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
119972
Add attributes field to PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119972
Summary
Add attributes field to PropertySlot
Gavin Barraclough
Reported
2013-08-18 00:22:41 PDT
For all JSC types, this makes getOwnPropertyDescriptor redundant. There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour. (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
Attachments
Fix
(70.96 KB, patch)
2013-08-18 00:47 PDT
,
Gavin Barraclough
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
(691.76 KB, application/zip)
2013-08-18 02:25 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2
(530.70 KB, application/zip)
2013-08-18 03:58 PDT
,
Build Bot
no flags
Details
Fix for JSHistory bug - accidental use of null entry!
(70.97 KB, patch)
2013-08-18 09:56 PDT
,
Gavin Barraclough
ggaren
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Gavin Barraclough
Comment 1
2013-08-18 00:47:57 PDT
Created
attachment 209020
[details]
Fix
WebKit Commit Bot
Comment 2
2013-08-18 00:49:33 PDT
Attachment 209020
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/API/JSCallbackObjectFunctions.h', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/runtime/Arguments.cpp', u'Source/JavaScriptCore/runtime/JSActivation.cpp', u'Source/JavaScriptCore/runtime/JSArray.cpp', u'Source/JavaScriptCore/runtime/JSArrayBuffer.cpp', u'Source/JavaScriptCore/runtime/JSArrayBufferView.cpp', u'Source/JavaScriptCore/runtime/JSDataView.cpp', u'Source/JavaScriptCore/runtime/JSFunction.cpp', u'Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h', u'Source/JavaScriptCore/runtime/JSObject.cpp', u'Source/JavaScriptCore/runtime/JSObject.h', u'Source/JavaScriptCore/runtime/JSString.h', u'Source/JavaScriptCore/runtime/JSSymbolTableObject.h', u'Source/JavaScriptCore/runtime/Lookup.cpp', u'Source/JavaScriptCore/runtime/Lookup.h', u'Source/JavaScriptCore/runtime/PropertySlot.h', u'Source/JavaScriptCore/runtime/RegExpObject.cpp', u'Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp', u'Source/WebCore/bindings/js/JSDOMWindowCustom.cpp', u'Source/WebCore/bindings/js/JSHistoryCustom.cpp', u'Source/WebCore/bindings/js/JSLocationCustom.cpp', u'Source/WebCore/bindings/js/JSPluginElementFunctions.cpp', u'Source/WebCore/bindings/scripts/CodeGeneratorJS.pm', u'Source/WebCore/bridge/runtime_array.cpp', u'Source/WebCore/bridge/runtime_method.cpp', u'Source/WebCore/bridge/runtime_object.cpp', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp']" exit_code: 1 Source/JavaScriptCore/runtime/PropertySlot.h:40: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:41: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:42: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:43: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:44: One space before end of line comments [whitespace/comments] [5] Total errors found: 5 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 3
2013-08-18 02:25:16 PDT
Comment on
attachment 209020
[details]
Fix
Attachment 209020
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/1470748
New failing tests: http/tests/security/cross-frame-access-history-get.html http/tests/history/cross-origin-replace-history-object-child.html
Build Bot
Comment 4
2013-08-18 02:25:18 PDT
Created
attachment 209021
[details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Build Bot
Comment 5
2013-08-18 03:58:36 PDT
Comment on
attachment 209020
[details]
Fix
Attachment 209020
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/1478394
New failing tests: http/tests/history/cross-origin-replace-history-object-child.html
Build Bot
Comment 6
2013-08-18 03:58:39 PDT
Created
attachment 209024
[details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Gavin Barraclough
Comment 7
2013-08-18 09:56:42 PDT
Created
attachment 209036
[details]
Fix for JSHistory bug - accidental use of null entry!
WebKit Commit Bot
Comment 8
2013-08-18 09:59:11 PDT
Attachment 209036
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/API/JSCallbackObjectFunctions.h', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/runtime/Arguments.cpp', u'Source/JavaScriptCore/runtime/JSActivation.cpp', u'Source/JavaScriptCore/runtime/JSArray.cpp', u'Source/JavaScriptCore/runtime/JSArrayBuffer.cpp', u'Source/JavaScriptCore/runtime/JSArrayBufferView.cpp', u'Source/JavaScriptCore/runtime/JSDataView.cpp', u'Source/JavaScriptCore/runtime/JSFunction.cpp', u'Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h', u'Source/JavaScriptCore/runtime/JSObject.cpp', u'Source/JavaScriptCore/runtime/JSObject.h', u'Source/JavaScriptCore/runtime/JSString.h', u'Source/JavaScriptCore/runtime/JSSymbolTableObject.h', u'Source/JavaScriptCore/runtime/Lookup.cpp', u'Source/JavaScriptCore/runtime/Lookup.h', u'Source/JavaScriptCore/runtime/PropertySlot.h', u'Source/JavaScriptCore/runtime/RegExpObject.cpp', u'Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp', u'Source/WebCore/ChangeLog', u'Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp', u'Source/WebCore/bindings/js/JSDOMWindowCustom.cpp', u'Source/WebCore/bindings/js/JSHistoryCustom.cpp', u'Source/WebCore/bindings/js/JSLocationCustom.cpp', u'Source/WebCore/bindings/js/JSPluginElementFunctions.cpp', u'Source/WebCore/bindings/scripts/CodeGeneratorJS.pm', u'Source/WebCore/bridge/runtime_array.cpp', u'Source/WebCore/bridge/runtime_method.cpp', u'Source/WebCore/bridge/runtime_object.cpp', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp']" exit_code: 1 Source/JavaScriptCore/runtime/PropertySlot.h:40: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:41: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:42: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:43: One space before end of line comments [whitespace/comments] [5] Source/JavaScriptCore/runtime/PropertySlot.h:44: One space before end of line comments [whitespace/comments] [5] Total errors found: 5 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 9
2013-08-18 10:18:47 PDT
Comment on
attachment 209036
[details]
Fix for JSHistory bug - accidental use of null entry! View in context:
https://bugs.webkit.org/attachment.cgi?id=209036&action=review
Hard to tell by reading whether this is correct, but I approve of this approach, so r=me.
> Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:168 > JSValue value = thisObject->getStaticValue(exec, propertyName); > if (value) { > - slot.setValue(thisObject, value); > + slot.setValue(thisObject, ReadOnly | DontEnum, value); > return true;
I think static values have their own attributes, no?
> Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:177 > if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { > if (staticFunctions->contains(name)) { > - slot.setCustom(thisObject, staticFunctionGetter); > + slot.setCustom(thisObject, ReadOnly | DontEnum, staticFunctionGetter); > return true; > }
Ditto for static functions.
Gavin Barraclough
Comment 10
2013-08-18 12:00:32 PDT
(In reply to
comment #9
)
> Hard to tell by reading whether this is correct, but I approve of this approach, so r=me.
Oh - should have mentioned - I tested by adding an assert in objectConstructorGetOwnPropertyDescriptor to ensure GOPS/GOPD return the same results. Results match for all objects other than some WebCore ones (particularly the window object) where the GOPS/GOPD behaviour does not currently match (I'll work on aligning that next).
> > Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:168 > > JSValue value = thisObject->getStaticValue(exec, propertyName); > I think static values have their own attributes, no? > > > Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:177 > > if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { > Ditto for static functions.
Yes – but I intend to leave these as is for now. I'd like to separate the refactoring of unifying GOPS/GOPD from any changes in behavior, and whilst you're right that this information does exist for static values, GOPD just ignores it. I'd like to make GOPS do the same for now, and then once I've removed GOPD I'll follow up with a patch to fix the attributes.
Gavin Barraclough
Comment 11
2013-08-18 12:29:06 PDT
Committed revision 154253.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug