Open Bug 1065920 Opened 10 years ago Updated 2 years ago

Modifying data attribute of <object> causes NS_ERROR_UNEXPECTED exception

Categories

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

x86_64
All
defect

Tracking

()

People

(Reporter: duanyao.ustc, Unassigned)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20140811030203

Steps to reproduce:

1. create a html/xhtml/xml Document instance from XMLHttpRequest or DOMParser, which contains a <object> element.

2. modify the 'data' attribute of the <object>.

You can load the attachment to reproduce this issue.



Actual results:

A NS_ERROR_UNEXPECTED exception it thrown, though the element is modified as expected.


Expected results:

No exception should be thrown.
Testcase also hits

###!!! ASSERTION: LoadObject called while not bound to an active document: 'Not Reached', file /content/base/src/nsObjectLoadingContent.cpp, line 2034
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: assertion, testcase
OS: Windows Server 2003 → All
Version: 34 Branch → Trunk
test cases for both <embed> and <object>
Modifying 'src' attribute of <embed> has same issue, see the second attachment.
John, can you take a look, please?
Flags: needinfo?(jschoenick)
In particular, the patch for bug 745030 is what made us propagate the return value of LoadObject to SetAttr callers.  That change looks wrong to me, and directly leads to this exception.
Blocks: 745030
(In reply to Boris Zbarsky [:bz] from comment #5)
> In particular, the patch for bug 745030 is what made us propagate the return
> value of LoadObject to SetAttr callers.  That change looks wrong to me, and
> directly leads to this exception.

Yeah I'm not sure why that was done -- I don't think I was considering that SetAttr failures would propagate to content, and LoadObject shouldn't fail. The assertion is similarly bogus -- I it's meant to be checking that the owning document is active, not that it is bound to an active document.
Assignee: nobody → jschoenick
Status: NEW → ASSIGNED
Flags: needinfo?(jschoenick)
I have a disasterously long start-up time and slow operation in current Beta, Mozilla 36. It pop-ups window how script "chrome://global/content/bindings/browser.xml" or "chrome://global/content/bindings/browser.xml" at certain random lines is hung and asks whether I wish to stop it or continue. 

(I never can determine actual string where the hung happens since those files are dynamic and by the time I open them the lines that were pointed during error message already make no sense, leading to "}" or to a commented lines.)

Then I see the following error in the browser console:

Exception { message: "", result: 2147549183, name: "NS_ERROR_UNEXPECTED", filename: "resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/highlighter.js", lineNumber: 454, columnNumber: 0, inner: null, data: null, stack: "CanvasFrameAnonymousContentHelper.prototype._insert@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/highlighter.js:454:22
CanvasFrameAnonymousContentHelper.prototype._onNavigate@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/highlighter.js:460:6
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:97:8
TabActor.prototype._navigate@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:1462:0
DebuggerProgressListener.prototype.onStateChange<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:2144:6
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:13
ContentRestoreInternal.prototype.restoreHistory@resource://app/modules/sessionstore/ContentRestore.jsm:130:4
MessageListener.receiveMessage@chrome://browser/content/content-sessionStore.js:129:8
", location: XPCWrappedNative_NoHelper }
Comment 7 seems to have nothing to do with this bug.
Component: DOM → DOM: Core & HTML

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: john → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: