Bug 47969 - Unify globalData APIs
Summary: Unify globalData APIs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-20 00:09 PDT by Xan Lopez
Modified: 2010-10-23 17:15 PDT (History)
3 users (show)

See Also:


Attachments
globaldataref.diff (29.47 KB, patch)
2010-10-20 00:11 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
globaldataref.diff (32.02 KB, patch)
2010-10-20 00:56 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
globaldataref.diff (35.18 KB, patch)
2010-10-20 02:15 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
globaldata.diff (40.54 KB, patch)
2010-10-20 06:12 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 2010-10-20 00:09:50 PDT
The globalData getter in JSGlobalObject returns a pointer, while the one in CallFrame.h returns a reference. There was a FIXME in CallFrame.h suggesting to unify them, so the attached patch does that.

I wasn't completely sure of which way to go with this, but after some googling I decided to move the getter in JSGlobalObject to return a reference, since it seems it's the preferred thing to do in the public API of classes when there's no need to, say, return NULL in special cases.

There's no change in the tests or significant change in SunSpider.
Comment 1 Xan Lopez 2010-10-20 00:11:39 PDT
Created attachment 71257 [details]
globaldataref.diff
Comment 2 Early Warning System Bot 2010-10-20 00:34:37 PDT
Attachment 71257 [details] did not build on qt:
Build output: http://queues.webkit.org/results/4545007
Comment 3 Xan Lopez 2010-10-20 00:56:57 PDT
Created attachment 71262 [details]
globaldataref.diff

Try to fix WebKit2 build.
Comment 4 Eric Seidel (no email) 2010-10-20 02:04:33 PDT
Attachment 71257 [details] did not build on mac:
Build output: http://queues.webkit.org/results/4514008
Comment 5 Xan Lopez 2010-10-20 02:15:13 PDT
Created attachment 71265 [details]
globaldataref.diff

And objc bindings.
Comment 6 Eric Seidel (no email) 2010-10-20 03:52:09 PDT
Attachment 71262 [details] did not build on mac:
Build output: http://queues.webkit.org/results/4597007
Comment 7 Eric Seidel (no email) 2010-10-20 05:37:14 PDT
Attachment 71265 [details] did not build on mac:
Build output: http://queues.webkit.org/results/4576011
Comment 8 Xan Lopez 2010-10-20 06:12:22 PDT
Created attachment 71280 [details]
globaldata.diff

Fix WebKit/mac
Comment 9 Xan Lopez 2010-10-23 17:15:36 PDT
Comment on attachment 71280 [details]
globaldata.diff

Landed as r70406.
Comment 10 Xan Lopez 2010-10-23 17:15:47 PDT
Closing bug.