Closed Bug 420612 Opened 16 years ago Closed 16 years ago

"Assertion failure: obj == pobj"

Categories

(Core :: JavaScript Engine, defect)

x86
All
defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.9beta4

People

(Reporter: jruderman, Assigned: mrbkap)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(1 file)

js> this.__proto__ = []; this.unwatch("x");
Assertion failure: obj == pobj, at jsinterp.c:149
This happens because js_LookupPropertyWithFlags simply returns the current |protoIndex| if the next object on the prototype chain is not native. Perhaps it should be returning |protoIndex + 1|?
Attached patch Like soSplinter Review
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #306934 - Flags: review?(brendan)
covered by js1_6/Array/regress-415540.js also

caused by bug 418139
Blocks: 418139
Flags: in-testsuite?
Flags: in-litmus-
Flags: blocking1.9?
OS: Mac OS X → All
Comment on attachment 306934 [details] [diff] [review]
Like so

Another easy fix, thanks. It's absolutely correct, since protoIndex is a hint only when non-zero. But it had better be non-zero in this case.

/be
Attachment #306934 - Flags: review?(brendan)
Attachment #306934 - Flags: review+
Attachment #306934 - Flags: approval1.9b4?
Attachment #306934 - Flags: approval1.9+
Flags: blocking1.9? → blocking1.9+
Target Milestone: --- → mozilla1.9
Comment on attachment 306934 [details] [diff] [review]
Like so

a1.9b4=beltzner
Attachment #306934 - Flags: approval1.9b4? → approval1.9b4+
Fix committed for mrbkap:

js/src/jsobj.c 3.444

/be
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: blocking1.9+ → blocking1.9?
Resolution: --- → FIXED
Target Milestone: mozilla1.9 → ---
Target Milestone: --- → mozilla1.9beta4
also ecma_3/Array/regress-390598.js, js1_5/extensions/regress-390598.js
Checking in regress-420612.js;
/cvsroot/mozilla/js/tests/js1_5/extensions/regress-420612.js,v  <--  regress-420612.js
initial revision: 1.1
Flags: in-testsuite? → in-testsuite+
This fails in the browser 
<http://test.bclary.com/tests/mozilla.org/js/js-test-driver-standards.html?test=js1_5/extensions/regress-420612.js;language=type;text/javascript>

with FAILED! expected: invalid __proto__ value (can only be set to null)

Is that a browser only restriction? Should the testcase be modified to try to catch the exception?
$ grep 'only be set to null' xpconnect/src/*.cpp
xpconnect/src/XPCCrossOriginWrapper.cpp:      JS_ReportError(cx, "invalid __proto__ value (can only be set to null)");

(Nit: "can be set to null only" or "can be set only to null" would be better.)

/be
/me should learn that new fangled grep thing.

/cvsroot/mozilla/js/tests/js1_5/extensions/regress-420612.js,v  <--  regress-420612.js
new revision: 1.2; previous revision: 1.1

ping me or update the test yourself whoever changes the exception message.
v 1.9.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: