Rename JSAPI global object accessors

RESOLVED FIXED in mozilla25

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

unspecified
mozilla25
x86
macOS
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Now that JS_GetGlobalObject is gone, the naming could use some improvement.
This is more correct, since the object very often is not a global.
Attachment #782772 - Flags: review?(luke)
This was done with perl/grep.
Attachment #782774 - Flags: review?(luke)
Comment on attachment 782772 [details] [diff] [review]
Part 1 - Rename js::GetDefaultGlobalForContext to js::GetDefaultObjectForContext. v1

By the previous reasoning on irc, how about naming this js::DefaultObjectForContextOrNull?
Attachment #782772 - Flags: review?(luke) → review+
Attachment #782773 - Flags: review?(luke) → review+
Attachment #782774 - Flags: review?(luke) → review+
Oops, I should have looked closer before pushing the typo fix: the patch with the bustage clearly intended to replace all the JS_GetGlobalForScopeChain with JS::CurrentGlobalOrNull, so the s/js::/JS::/ fix in comment 6 was wrong.

https://hg.mozilla.org/integration/mozilla-inbound/rev/5d56f5be9d3f

Nice job glandium for noticing!
(In reply to Luke Wagner [:luke] from comment #7)
> Nice job glandium for noticing!

Nice catch! the js/ipc thing came up while rebasing right before pushing, so I must have messed it up.
You need to log in before you can comment on or make changes to this bug.