Closed Bug 435656 Opened 16 years ago Closed 16 years ago

Make nsCxPusher::Push to handle all kinds of nsPIDOMEventTargets

Categories

(Core :: DOM: Events, defect, P2)

x86
All
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently nsCxPusher::Push(nsISupports*) is used with DOM Nodes and |window|,
but it should be able handle all kinds of nsPIDOMEventTarget objects, like
XHR (once bug 372964 is fixed).
Attached patch possible patch (obsolete) — Splinter Review
Attachment #322445 - Flags: review?(jst)
Any chance for a review?
wanted1.9.1? because this blocks bug 372964, which blocks wanted1.9.1+ bug 435425.
Flags: wanted1.9.1?
Flags: wanted1.9.1? → wanted1.9.1+
Priority: -- → P2
Blocks: 445550
Comment on attachment 322445 [details] [diff] [review]
possible patch

- In nsCxPusher::Push():

-  if (mScx) {
-    NS_ERROR("Whaaa! No double pushing with nsCxPusher::Push()!");
-
-    return PR_FALSE;
[...]
+  NS_ASSERTION(!mScx, "Whaaa! No double pushing with nsCxPusher::Push()!");

Unless there's a reason not to, I'd still prefer to leave the early return if we ever get here, just in case.

- In nsContentUtils::GetContextForEventHandlers():

+  if (sgo) {
+    NS_IF_ADDREF(*aContext = sgo->GetContext());
+    // Bad, no context from script global object!
+    NS_ENSURE_STATE(*aContext);
+  }
+
+  return NS_OK;

It's possible for us to return here w/o ever having set *aContext to null.

r+sr=jst with that looked into.
Attachment #322445 - Flags: superreview+
Attachment #322445 - Flags: review?(jst)
Attachment #322445 - Flags: review+
Attached patch patchSplinter Review
Attachment #322445 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: