Closed Bug 811414 Opened 13 years ago Closed 13 years ago

nsISettingsServiceCallback shouldn't use [implicit_jscontext]

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: bholley, Assigned: gwagner)

References

Details

Attachments

(2 files, 1 obsolete file)

If they're implement in JS, we don't support [implicit_jscontext] or [optional_arg]. We can use the JS context stack here.
Summary: nsISettingsService and friends shouldn't use [implicit_jscontext] → nsISettingsServiceCallback shouldn't use [implicit_jscontext]
Attached patch patch (obsolete) — Splinter Review
Let's hope it's that simple.
Assignee: bobbyholley+bmo → anygregor
blocking-basecamp: --- → ?
Awesome, thanks gregor! FWIW you can just use nsContentUtils::GetCurrentJSContext() and nsContentUtils::GetSafeJSContext.
Looks like there was some compile nastiness with the thread context stack stuff. Try just including "nsContentUtils.h" and using nsContentUtils::GetCurrentJSContext().
(In reply to Bobby Holley (:bholley) from comment #4) > Looks like there was some compile nastiness with the thread context stack > stuff. Try just including "nsContentUtils.h" and using > nsContentUtils::GetCurrentJSContext(). Yes I did another try run earlier with some fixes: https://tbpl.mozilla.org/?tree=Try&rev=ec51cc01c3ca
Nice! Some comments: Please rev the IID on nsISettingsServiceCallback. Just use NS_ENSURE_TRUE(cx, NS_OK) to check the safe JS context. You need to enter the compartment of aResult before creating the dependent string.
blocking-basecamp: ? → +
Attached patch patchSplinter Review
Attachment #681232 - Attachment is obsolete: true
Attachment #681608 - Flags: review?(bobbyholley+bmo)
Comment on attachment 681608 [details] [diff] [review] patch Review of attachment 681608 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=bholley
Attachment #681608 - Flags: review?(bobbyholley+bmo) → review+
Attached patch followupSplinter Review
Comment on attachment 681676 [details] [diff] [review] followup r=mrbkap standing right next to me
Attachment #681676 - Flags: review+
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
This is marked as blocking-basecamp+ but doesn't apply cleanly to Aurora due to it not having dom/system/gonk/TimeZoneSettingObserver.cpp. Please either post a branch-specific patch or let me know if it's OK to just ignore the changes to that file.
(In reply to Ryan VanderMeulen from comment #15) > This is marked as blocking-basecamp+ but doesn't apply cleanly to Aurora due > to it not having dom/system/gonk/TimeZoneSettingObserver.cpp. Please either > post a branch-specific patch or let me know if it's OK to just ignore the > changes to that file. Good question. Let's ask cjones if we want dom/system/gonk/TimeZoneSettingObserver.cpp in aurora.
Flags: needinfo?(jones.chris.g)
Can we get this landed on aurora? the branch is almost here.
(In reply to Gregor Wagner [:gwagner] from comment #16) > (In reply to Ryan VanderMeulen from comment #15) > > This is marked as blocking-basecamp+ but doesn't apply cleanly to Aurora due > > to it not having dom/system/gonk/TimeZoneSettingObserver.cpp. Please either > > post a branch-specific patch or let me know if it's OK to just ignore the > > changes to that file. > > Good question. Let's ask cjones if we want > dom/system/gonk/TimeZoneSettingObserver.cpp in aurora. What is this fellow? Why isn't it on aurora already?
Flags: needinfo?(jones.chris.g)
(In reply to Chris Jones [:cjones] [:warhammer] from comment #18) > (In reply to Gregor Wagner [:gwagner] from comment #16) > > (In reply to Ryan VanderMeulen from comment #15) > > > This is marked as blocking-basecamp+ but doesn't apply cleanly to Aurora due > > > to it not having dom/system/gonk/TimeZoneSettingObserver.cpp. Please either > > > post a branch-specific patch or let me know if it's OK to just ignore the > > > changes to that file. > > > > Good question. Let's ask cjones if we want > > dom/system/gonk/TimeZoneSettingObserver.cpp in aurora. > > What is this fellow? Why isn't it on aurora already? It's bug 792290 and it was not marked as blocking-basecamp.
Blocks: 813278
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: