Closed
Bug 780507
Opened 12 years ago
Closed 12 years ago
Expose the idle API only to certified apps
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)
References
Details
Attachments
(1 file)
1.30 KB,
patch
|
mounir
:
review+
|
Details | Diff | Splinter Review |
The idle API is currently available to all webpages.
But per recent discussions on the mailing lists (dev-webapi, "should the idle service be exposed to the unprivileged web?"), we should only expose it to certified apps (and chrome).
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → justin.lebar+bug
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #649169 -
Flags: review?(mounir)
Assignee | ||
Comment 2•12 years ago
|
||
This passes the two idle API tests locally, but just in case:
https://tbpl.mozilla.org/?tree=Try&rev=87837531db53
Comment 3•12 years ago
|
||
Comment on attachment 649169 [details] [diff] [review]
Patch, v1
Review of attachment 649169 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/Navigator.cpp
@@ +653,5 @@
> nsCOMPtr<nsPIDOMWindow> win = do_QueryReferent(mWindow);
> NS_ENSURE_TRUE(win, NS_ERROR_UNEXPECTED);
> +
> + nsCOMPtr<nsIScriptObjectPrincipal> winSOP = do_QueryInterface(win);
> + NS_ENSURE_TRUE(winSOP, NS_ERROR_UNEXPECTED);
What about using NodePrincipal() from window->GetExtantDocument()?
Attachment #649169 -
Flags: review?(mounir) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Comment 5•12 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #0)
Yeah. And even for privileged Web apps, I would prefer prompting the user whether to disclose the info. Or the warning when the user knights a page as privileged app has to be very clear about the implications.
Comment 6•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Comment 7•12 years ago
|
||
Idle Timer stop working with System app this morning ... would it be possible because of this bug? |dump(navigator.addIdleObserver);| still return a function though and there were no JavaScript errors.
Assignee | ||
Comment 8•12 years ago
|
||
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TW) from comment #7)
> Idle Timer stop working with System app this morning ... would it be
> possible because of this bug? |dump(navigator.addIdleObserver);| still
> return a function though and there were no JavaScript errors.
Were there JS errors when you /called/ the function?
Is the system app a certified app?
Comment 9•12 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #8)
> (In reply to Tim Guan-tin Chien [:timdream] (MoCo-TW) from comment #7)
> > Idle Timer stop working with System app this morning ... would it be
> > possible because of this bug? |dump(navigator.addIdleObserver);| still
> > return a function though and there were no JavaScript errors.
>
> Were there JS errors when you /called/ the function?
There wasn't.
> Is the system app a certified app?
I would be surprised if it's not. How do I check that?
Assignee | ||
Updated•12 years ago
|
Summary: Expose the idle API only to privileged apps → Expose the idle API only to certified apps
Updated•12 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•