Bug 159542

Summary: We may add a ReadOnly property without setting the corresponding bit on Structure
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, sukolsak, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Saam Barati
Reported 2016-07-07 20:11:43 PDT
...
Attachments
patch (3.02 KB, patch)
2016-07-08 17:21 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2016-07-07 20:13:06 PDT
Saam Barati
Comment 2 2016-07-08 17:21:07 PDT
Saam Barati
Comment 3 2016-07-08 17:22:08 PDT
Comment on attachment 283228 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=283228&action=review > Source/JavaScriptCore/runtime/JSObject.h:1569 > + if (attributes & ReadOnly) > + structure->setContainsReadOnlyProperties(); I put this here to be consistent with JSObject::putDirectInternal, but I almost feel like putting it inside Structure::addPropertyWithoutTransition is a more natural place for it.
Benjamin Poulain
Comment 4 2016-07-08 17:29:21 PDT
Comment on attachment 283228 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=283228&action=review >> Source/JavaScriptCore/runtime/JSObject.h:1569 >> + structure->setContainsReadOnlyProperties(); > > I put this here to be consistent with JSObject::putDirectInternal, > but I almost feel like putting it inside Structure::addPropertyWithoutTransition > is a more natural place for it. I think that makes sense in addPropertyWithoutTransition() for both call sites. What's wrong with that?
Saam Barati
Comment 5 2016-07-08 17:33:50 PDT
Comment on attachment 283228 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=283228&action=review >>> Source/JavaScriptCore/runtime/JSObject.h:1569 >>> + structure->setContainsReadOnlyProperties(); >> >> I put this here to be consistent with JSObject::putDirectInternal, >> but I almost feel like putting it inside Structure::addPropertyWithoutTransition >> is a more natural place for it. > > I think that makes sense in addPropertyWithoutTransition() for both call sites. What's wrong with that? I agree. I'm going to open another bug to consider this. I think we should also consider the Structure::addNewPropertyTransition to have it mark the bit on the new transition it's returning.
Saam Barati
Comment 6 2016-07-08 18:09:59 PDT
WebKit Commit Bot
Comment 7 2016-07-08 18:30:35 PDT
Comment on attachment 283228 [details] patch Clearing flags on attachment: 283228 Committed r203015: <http://trac.webkit.org/changeset/203015>
WebKit Commit Bot
Comment 8 2016-07-08 18:30:40 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.