Closed
Bug 787961
Opened 13 years ago
Closed 13 years ago
Remove mDocument from WorkerPrivate
Categories
(Core :: DOM: Workers, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Unassigned)
Details
Attachments
(2 files)
|
8.22 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
|
8.23 KB,
patch
|
Details | Diff | Splinter Review |
I'm not at all familiar with this code, but I don't really understand the need for
keeping document alive. Having pointer to the inner window should be enough.
https://tbpl.mozilla.org/?tree=Try&rev=c94f127254d1
(This does not fix https://bugzilla.mozilla.org/show_bug.cgi?id=785248)
| Reporter | ||
Updated•13 years ago
|
Attachment #657876 -
Flags: review?(bent.mozilla)
Comment 1•13 years ago
|
||
>+ MOZ_ASSERT(!mWindow || mWindow->IsInnerWindow());
MOZ_ASSERT_IF(mWindow, mWindow->IsInnerWindow());
| Reporter | ||
Comment 2•13 years ago
|
||
I prefer to not use _IF. It tends to make code harder to read.
Comment on attachment 657876 [details] [diff] [review]
patch
Review of attachment 657876 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/workers/WorkerPrivate.cpp
@@ +2274,5 @@
> uint64_t
> WorkerPrivateParent<Derived>::GetInnerWindowId()
> {
> AssertIsOnMainThread();
> + MOZ_ASSERT(!mWindow || mWindow->IsInnerWindow());
NIT: Please use NS_ASSERTION for now. At some point we need to go change all of these, but having a mix of both is awful (especially since you get no stack traces on tinderbox for MOZ_ASSERT at the moment).
::: dom/workers/WorkerPrivate.h
@@ +22,5 @@
> #include "nsStringGlue.h"
> #include "nsTArray.h"
> #include "nsTPriorityQueue.h"
> #include "StructuredCloneTags.h"
> +#include "nsPIDOMWindow.h"
Nit: Please move this into the other list of includes (for interfaces, above), in alphabetical order.
Attachment #657876 -
Flags: review?(bent.mozilla) → review+
| Reporter | ||
Comment 4•13 years ago
|
||
| Reporter | ||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•