Closed Bug 430050 Opened 12 years ago Closed 12 years ago

xul:browser changes break Firebug

Categories

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

x86
All
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(3 files)

No description provided.
Attachment #316804 - Flags: review?(jonas)
Gotta block, and we need some test coverage here, clearly. :/
Flags: blocking1.9+
yup, I'm writing tests.
Assignee: nobody → Olli.Pettay
I don't want to discourage your work on this problem, but it need not block 411814, firebug no longer uses loadURI in its own load sequence.
I would be extremely surprised if this didn't also affect other extensions, but yeah, thanks a ton for that parallel fix.
Attached patch a testSplinter Review
This is not a perfect test. I should still figure out how to test the
behavior Firebug does. But useful test anyway.
Comment on attachment 316804 [details] [diff] [review]
cancel frameloader initialization when needed.

>+  // Don't use a temporary array for mInitializableFrameLoaders, because
>+  // loading a frame may cause some other frameloader to be removed from the
>+  // array. But be careful to keep the loader alive when starting the load!
>+  while (mInitializableFrameLoaders.Length()) {
>+    nsRefPtr<nsFrameLoader> loader = mInitializableFrameLoaders[0];
>+    mInitializableFrameLoaders.RemoveElementAt(0);
>+    if (loader) {
>+      loader->ReallyStartLoading();

Is the nullcheck really needed?

>@@ -6808,16 +6808,28 @@ nsDocShell::InternalLoad(nsIURI * aURI,
>         return NS_ERROR_FAILURE;
>     }
> 
>     rv = CheckLoadingPermissions();
>     if (NS_FAILED(rv)) {
>         return rv;
>     }
> 
>+    // If this docshell is owned by a frameloader, make sure to cancel
>+    // possible frameloader initialization before loading a new page.
>+    nsCOMPtr<nsIDocShellTreeItem> parent;
>+    GetParent(getter_AddRefs(parent));
>+    if (parent) {
>+      nsCOMPtr<nsIDOMDocument> domDoc = do_GetInterface(parent);
>+      nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);

Silly that docshells don't GetInterface to nsIDocument :(

r=me
Attachment #316804 - Flags: review?(jonas) → review+
Comment on attachment 316804 [details] [diff] [review]
cancel frameloader initialization when needed.

nullcheck is not needed.
Doesn't cause any harm though.
Attachment #316804 - Flags: superreview?(jst)
Attachment #316804 - Flags: superreview?(jst) → superreview+
Attachment #316804 - Flags: approval1.9?
Comment on attachment 316804 [details] [diff] [review]
cancel frameloader initialization when needed.

a1.9+=damons
Attachment #316804 - Flags: approval1.9? → approval1.9+
No longer blocks: 411814
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.