Rename JSAPI global object accessors

RESOLVED FIXED in mozilla25

Status

()

Core
XPConnect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

unspecified
mozilla25
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

5 years ago
Now that JS_GetGlobalObject is gone, the naming could use some improvement.
(Assignee)

Comment 1

5 years ago
Created attachment 782772 [details] [diff] [review]
Part 1 - Rename js::GetDefaultGlobalForContext to js::GetDefaultObjectForContext. v1

This is more correct, since the object very often is not a global.
Attachment #782772 - Flags: review?(luke)
(Assignee)

Comment 2

5 years ago
Created attachment 782773 [details] [diff] [review]
Part 2 - Rename JS_SetGlobalObject and move it into jsfriendapi. v1
Attachment #782773 - Flags: review?(luke)
(Assignee)

Comment 3

5 years ago
Created attachment 782774 [details] [diff] [review]
Part 3 - Rename JS_GetGlobalForScopeChain to JS::CurrentGlobalOrNull. v1

This was done with perl/grep.
Attachment #782774 - Flags: review?(luke)

Comment 4

5 years ago
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+

Updated

5 years ago
Attachment #782773 - Flags: review?(luke) → review+

Updated

5 years ago
Attachment #782774 - Flags: review?(luke) → review+

Comment 7

5 years ago
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!
(Assignee)

Comment 8

5 years ago
(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.