Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 327697 - Make XPConnect refuse to wrap E4X (was: HTMLSelectElement.add hangs if second parameter is E4X)
: Make XPConnect refuse to wrap E4X (was: HTMLSelectElement.add hangs if second...
: hang, testcase, verified1.8.0.2, verified1.8.1
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: P1 normal (vote)
: mozilla1.9alpha1
Assigned To: Blake Kaplan (:mrbkap)
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: 326633 326615
  Show dependency treegraph
Reported: 2006-02-17 22:31 PST by Jesse Ruderman
Modified: 2006-07-07 21:17 PDT (History)
5 users (show)
dveditz: blocking1.8.1+
dveditz: blocking1.8.0.2+
bob: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (266 bytes, text/html)
2006-02-17 22:32 PST, Jesse Ruderman
no flags Details
Hack-fix (1.24 KB, patch)
2006-02-21 19:26 PST, Blake Kaplan (:mrbkap)
brendan: review+
shaver: superreview+
dveditz: approval‑branch‑1.8.1+
dveditz: approval1.8.0.2+
Details | Diff | Splinter Review
What I checked into the 1.8 branches (1.38 KB, patch)
2006-03-07 11:29 PST, Blake Kaplan (:mrbkap)
no flags Details | Diff | Splinter Review

Description Jesse Ruderman 2006-02-17 22:31:12 PST
Comment 1 Jesse Ruderman 2006-02-17 22:32:04 PST
Created attachment 212294 [details]
Comment 2 Blake Kaplan (:mrbkap) 2006-02-21 19:25:36 PST
E4X interacts badly with XPConnect and the way it does wrapping. In this case we're trying to walk up the parent chain of an E4X object, which (similarly to bug     326615) is causing us to think there's always a parent element. The best way to fix this for now is to make XPConnect simply refuse to wrap E4X objects.
Comment 3 Blake Kaplan (:mrbkap) 2006-02-21 19:26:25 PST
Created attachment 212688 [details] [diff] [review]

We should be able to remove this hack when the DOM <-> E4X bindings are in place.
Comment 4 Brendan Eich [:brendan] 2006-02-21 19:30:57 PST
Comment on attachment 212688 [details] [diff] [review]

Throw an exception, please!

Comment 5 Brendan Eich [:brendan] 2006-02-21 19:32:42 PST
Comment on attachment 212688 [details] [diff] [review]

Curse me for not reading the (missing) context!

All's well, this method is supposed to return true or false and its caller is responsible for throwing in the latter case -- mrbkap kindly pointed that out in person.

Comment 6 Boris Zbarsky [:bz] (still a bit busy) 2006-02-21 19:35:03 PST
And file a followup (depending on whatever bugs it depends on) to undo this?
Comment 7 Blake Kaplan (:mrbkap) 2006-02-21 19:39:10 PST
I've added a reference to bug 270553 in the comment above the early return.
Comment 8 Mike Shaver (:shaver -- probably not reading bugmail closely) 2006-02-23 10:48:58 PST
Comment on attachment 212688 [details] [diff] [review]

Comment 9 Blake Kaplan (:mrbkap) 2006-02-23 14:21:18 PST
Fix checked into trunk.
Comment 10 Jesse Ruderman 2006-02-23 17:25:33 PST
Verified fixed.  The error message I now see looks reasonable:

Error: [Exception... "Could not convert JavaScript argument arg 1 [nsIDOMHTMLSelectElement.add]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: :: init :: line 9"  data: no]
Comment 11 Bob Clary [:bc:] 2006-02-26 00:17:40 PST
Checking in regress-327697.js;
/cvsroot/mozilla/js/tests/e4x/Regress/regress-327697.js,v  <--  regress-327697.js
initial revision: 1.1
Comment 12 Daniel Veditz [:dveditz] 2006-03-07 11:19:34 PST
approving for 1.8.0 and 1.8 branches to fix hang after fix for bug 326615, a=dveditz
Comment 13 Blake Kaplan (:mrbkap) 2006-03-07 11:29:54 PST
Created attachment 214340 [details] [diff] [review]
What I checked into the 1.8 branches
Comment 14 Blake Kaplan (:mrbkap) 2006-03-07 11:30:19 PST
Checked into the 1.8 branches.
Comment 15 Bob Clary [:bc:] 2006-03-09 10:16:02 PST
v, 1.8, 1.9 20060308 win/linux/mac

Note You need to log in before you can comment on or make changes to this bug.