Closed Bug 752803 Opened 13 years ago Closed 10 years ago

Using Object.defineProperty to wrap history.pushState generates NS_ERROR_XPC_BAD_OP_ON_WN_PROTO errors, but only for the first few calls to the wrapped method.

Categories

(Core :: General, defect)

14 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: justin.lebar+bug, Unassigned)

Details

Attachments

(1 file)

Attached file Testcase (deleted) —
STR: * Open attached testcase * Open web console * Click the button * Notice that you get "NS_ERROR_XPC_BAD_OP_ON_WN_PROTO: Illegal operation on WrappedNative prototype object" * Keep clicking for a few seconds. * Eventually, you'll stop getting the error and the pushState will work! Surely we should either always throw or always work. It seems to be timing dependent more than number-of-clicks dependent. So maybe the error happens for the first N seconds after you open the page or something.
> * Eventually, you'll stop getting the error and the pushState will work! You'll notice because the URL of the page will change.
Might this be another variant of 593910?
I'm always getting > TypeError: 'pushState' called on an object that does not implement interface History. .. with this testcase on a nightly. Can you still reproduce? (In reply to dirk bergstrom from comment #2) > Might this be another variant of 593910? Making the bug link clickable: bug 593910.
In the testcase oldPushState is called with undefined this, which means it should throw every time with Web IDL bindings: the this object is not a History. Bound functions for the win....
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: