WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
158091
replaceable own properties seem to ignore replacement after property caching
https://bugs.webkit.org/show_bug.cgi?id=158091
Summary
replaceable own properties seem to ignore replacement after property caching
Geoffrey Garen
Reported
2016-05-25 14:33:28 PDT
replaceable own properties seem to ignore replacement after property caching
Attachments
patch
(6.61 KB, patch)
2016-05-25 14:56 PDT
,
Geoffrey Garen
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews107 for mac-yosemite-wk2
(1.40 MB, application/zip)
2016-05-25 15:57 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews117 for mac-yosemite
(1.60 MB, application/zip)
2016-05-25 16:05 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews124 for ios-simulator-wk2
(739.21 KB, application/zip)
2016-05-25 16:09 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews102 for mac-yosemite
(1.36 MB, application/zip)
2016-05-25 16:52 PDT
,
Build Bot
no flags
Details
patch
(6.57 KB, patch)
2016-05-25 21:29 PDT
,
Geoffrey Garen
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2016-05-25 14:56:40 PDT
Created
attachment 279826
[details]
patch
WebKit Commit Bot
Comment 2
2016-05-25 14:58:16 PDT
Attachment 279826
[details]
did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 3
2016-05-25 15:00:43 PDT
Comment on
attachment 279826
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279826&action=review
A JSC person should review this, just a few minor comments from me.
> Source/JavaScriptCore/runtime/Lookup.h:295 > + auto result = thisObj->putDirect(vm, propertyName, value);
I think bool is more readable and as short as bool :)
> Source/JavaScriptCore/runtime/Lookup.h:298 > + thisObj->JSObject::setStructure(exec->vm(), Structure::attributeChangeTransition(exec->vm(), thisObj->structure(), propertyName, 0));
should be vm not exec->vm()
Chris Dumez
Comment 4
2016-05-25 15:01:16 PDT
Comment on
attachment 279826
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279826&action=review
> Source/WebCore/ChangeLog:8 > + No new tests (OOPS!).
OOPS :)
Build Bot
Comment 5
2016-05-25 15:57:47 PDT
Comment on
attachment 279826
[details]
patch
Attachment 279826
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1382404
New failing tests: js/cached-window-properties.html
Build Bot
Comment 6
2016-05-25 15:57:51 PDT
Created
attachment 279832
[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
Build Bot
Comment 7
2016-05-25 16:05:11 PDT
Comment on
attachment 279826
[details]
patch
Attachment 279826
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1382403
New failing tests: js/cached-window-properties.html
Build Bot
Comment 8
2016-05-25 16:05:16 PDT
Created
attachment 279834
[details]
Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 9
2016-05-25 16:09:26 PDT
Comment on
attachment 279826
[details]
patch
Attachment 279826
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1382430
New failing tests: js/cached-window-properties.html
Build Bot
Comment 10
2016-05-25 16:09:30 PDT
Created
attachment 279835
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Build Bot
Comment 11
2016-05-25 16:52:54 PDT
Comment on
attachment 279826
[details]
patch
Attachment 279826
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1382632
New failing tests: js/cached-window-properties.html
Build Bot
Comment 12
2016-05-25 16:52:58 PDT
Created
attachment 279839
[details]
Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Geoffrey Garen
Comment 13
2016-05-25 21:29:46 PDT
Created
attachment 279865
[details]
patch
Darin Adler
Comment 14
2016-05-26 09:37:11 PDT
Comment on
attachment 279865
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279865&action=review
> Source/JavaScriptCore/runtime/Lookup.h:292 > +template <class ThisImp> > +inline bool replaceStaticPropertySlot(ExecState* exec, ThisImp* thisObj, PropertyName propertyName, JSValue value)
Here are things I would have done differently if I had written this: - I would have written it like this: template<typename ThisObjectClass> inline bool ... Note that I prefer template on the same line, no space after the word template, typename rather than class, no abbreviation in the class name, and in particular unclear why Imp is needed here. - I would have considered making the thisObject argument a JSObject* rather than making this a template. I am unclear on what we gain by using a function template. Actually, I would have used JSObject& but then I would have run into the rule where you all don’t allow that for JSObject in the JavaScriptCore side of things. - The first argument would be VM& vm since the function doesn’t need an ExecState and the caller is passing VM to other functions. - Or the first argument would be ExecState& state rather than ExecState* exec. - The second argument name would be thisObject rather than thisObj.
> Source/JavaScriptCore/runtime/Lookup.h:300 > + bool result = thisObj->putDirect(vm, propertyName, value); > + > + if (result && !thisObj->staticFunctionsReified()) > + thisObj->JSObject::setStructure(exec->vm(), Structure::attributeChangeTransition(vm, thisObj->structure(), propertyName, 0)); > + > + return result;
I would have used early return rather than a boolean: if (!thisObject.putDirect(vm, propertyName, value)) return false; ... return true; Also, the call to setStructure is using "exec->vm()" instead of just "vm" in one place.
Geoffrey Garen
Comment 15
2016-05-26 12:50:15 PDT
Committed
r201428
: <
http://trac.webkit.org/changeset/201428
>
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