Closed
Bug 910924
Opened 11 years ago
Closed 11 years ago
Give workers an nsIGlobalObject
Categories
(Core :: DOM: Workers, defect)
Core
DOM: Workers
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: khuey, Assigned: khuey)
References
Details
Attachments
(1 file)
(deleted),
patch
|
bent.mozilla
:
review+
bholley
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
This breaks the inheritance chain since you can't do much useful with a principal on a worker thread anyways. If you want a principal you really need to get the WorkerPrivate and do specialized stuff.
Attachment #797522 -
Flags: review?(bent.mozilla)
Assignee | ||
Updated•11 years ago
|
Attachment #797522 -
Flags: review?(bobbyholley+bmo)
Comment 2•11 years ago
|
||
Comment on attachment 797522 [details] [diff] [review]
Patch
Review of attachment 797522 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great. I'm surprised it was so easy.
::: content/events/src/nsDOMDataTransfer.cpp
@@ +492,5 @@
> nsresult rv = NS_OK;
> nsIScriptContext* c = pt->GetContextForEventHandlers(&rv);
> NS_ENSURE_TRUE(c && NS_SUCCEEDED(rv), NS_ERROR_DOM_SECURITY_ERR);
> + nsIGlobalObject* go = c->GetGlobalObject();
> + NS_ENSURE_TRUE(go, NS_ERROR_DOM_SECURITY_ERR);
I don't think this should be NS_ERROR_DOM_SECURITY_ERR.
::: dom/base/nsIScriptGlobalObject.h
@@ +9,5 @@
>
> #include "nsISupports.h"
> #include "nsEvent.h"
> #include "nsIGlobalObject.h"
> +#include "nsIScriptObjectPrincipal.h"
As noted on IRC, I don't think we need this.
Attachment #797522 -
Flags: review?(bobbyholley+bmo) → review+
Comment on attachment 797522 [details] [diff] [review]
Patch
Review of attachment 797522 [details] [diff] [review]:
-----------------------------------------------------------------
r=me on dom/workers changes
Attachment #797522 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #2)
> Comment on attachment 797522 [details] [diff] [review]
> Patch
>
> Review of attachment 797522 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Looks great. I'm surprised it was so easy.
>
> ::: content/events/src/nsDOMDataTransfer.cpp
> @@ +492,5 @@
> > nsresult rv = NS_OK;
> > nsIScriptContext* c = pt->GetContextForEventHandlers(&rv);
> > NS_ENSURE_TRUE(c && NS_SUCCEEDED(rv), NS_ERROR_DOM_SECURITY_ERR);
> > + nsIGlobalObject* go = c->GetGlobalObject();
> > + NS_ENSURE_TRUE(go, NS_ERROR_DOM_SECURITY_ERR);
>
> I don't think this should be NS_ERROR_DOM_SECURITY_ERR.
Everything else in that methods returns NS_ERROR_DOM_SECURITY_ERR, so I left it.
> ::: dom/base/nsIScriptGlobalObject.h
> @@ +9,5 @@
> >
> > #include "nsISupports.h"
> > #include "nsEvent.h"
> > #include "nsIGlobalObject.h"
> > +#include "nsIScriptObjectPrincipal.h"
>
> As noted on IRC, I don't think we need this.
Fixed.
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•