WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
160531
Pass JSGlobalObject* to the generated finishCreation functions
https://bugs.webkit.org/show_bug.cgi?id=160531
Summary
Pass JSGlobalObject* to the generated finishCreation functions
Simon Fraser (smfr)
Reported
2016-08-03 15:56:15 PDT
Pass JSGlobalObject* to the generated finishCreation functions
Attachments
Patch
(43.13 KB, patch)
2016-08-03 15:57 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2016-08-03 15:57:54 PDT
Created
attachment 285285
[details]
Patch
Daniel Bates
Comment 2
2016-08-03 16:15:27 PDT
Comment on
attachment 285285
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=285285&action=review
> Source/WebCore/bindings/scripts/test/TestObj.idl:49 > + EnabledAtRuntime=EnableFeatureName,
Did you intend to make this change?
Darin Adler
Comment 3
2016-08-05 23:13:40 PDT
Comment on
attachment 285285
[details]
Patch Can we make this new argument be a reference instead of a pointer?
Simon Fraser (smfr)
Comment 4
2016-08-05 23:27:30 PDT
I would love to but some callers take a pointer. In general, it's confusing how we pass around both a VM& and a JSGlobalObject* all over, since we normally get the VM from the GO.
Darin Adler
Comment 5
2016-08-05 23:30:50 PDT
(In reply to
comment #4
)
> I would love to but some callers take a pointer.
Are you saying that the pointer can be null? Or that we can’t easily add the "*" that would turn those pointers into references? Or something else?
Simon Fraser (smfr)
Comment 6
2016-08-06 09:58:31 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > I would love to but some callers take a pointer. > > Are you saying that the pointer can be null?
Unknown without digging into JSC, and I don't understand whether the VM and JSGO can come from different places. I may need to revise this patch anyway so I'll hold off from checking it in.
Chris Dumez
Comment 7
2016-08-06 14:45:18 PDT
Comment on
attachment 285285
[details]
Patch This may be a silly question but what prevents you from calling globalObject() in finishCreation() instead of passing the globalObject in parameter? It looks like we already do this for RuntimeEnabled features.
Geoffrey Garen
Comment 8
2016-08-11 15:39:07 PDT
> This may be a silly question but what prevents you from calling > globalObject() in finishCreation() instead of passing the globalObject in > parameter? It looks like we already do this for RuntimeEnabled features.
Probably nothing prevents you from calling globalObject() -- but if you have the global object already, you save a few loads by passing it instead of calling globalObject().
Simon Fraser (smfr)
Comment 9
2016-11-13 08:06:40 PST
I don't need this (it was about getting to Settings from bindings, and our generator already supports that).
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