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 723111 - Make it easier to completely unwrap an object
: Make it easier to completely unwrap an object
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla13
Assigned To: Blake Kaplan (:mrbkap)
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2012-02-01 07:41 PST by Blake Kaplan (:mrbkap)
Modified: 2012-02-03 11:41 PST (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (9.17 KB, patch)
2012-02-01 07:41 PST, Blake Kaplan (:mrbkap)
bzbarsky: review+
philringnalda: checkin-
Details | Diff | Splinter Review
Updated patch (9.91 KB, patch)
2012-02-01 12:13 PST, Blake Kaplan (:mrbkap)
mrbkap: review+
mrbkap: checkin+
Details | Diff | Splinter Review

Description Blake Kaplan (:mrbkap) 2012-02-01 07:41:24 PST
Created attachment 593445 [details] [diff] [review]

js::UnwrapObject currently has the following behavior:

If you pass an outer window directly to it, it returns the inner window ("unwrapping" the outer).

If you pass a security wrapper to it, it will unwrap up to the outer window, but won't unwrap it. This is useful for the case where we want to peak under the security wrappers, but don't actually need the native out of the JS object.

It turns out that it'd be useful to have an API that lets us get the innermost object. This patch adds that API and uses it in the two existing places that it seems to be useful.
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2012-02-01 08:30:45 PST
Comment on attachment 593445 [details] [diff] [review]

Comment 3 Phil Ringnalda (:philor) 2012-02-01 10:27:02 PST
Comment on attachment 593445 [details] [diff] [review]

Backed out in - about 90 short of passing make check.
Comment 4 Blake Kaplan (:mrbkap) 2012-02-01 12:13:38 PST
Created attachment 593555 [details] [diff] [review]
Updated patch

Carrying forward review: I missed a use of UnwrapObject in js/src/shell/js.cpp. Everything else is the same and the fix is trivial.
Comment 5 Blake Kaplan (:mrbkap) 2012-02-02 07:32:47 PST
Comment on attachment 593555 [details] [diff] [review]
Updated patch
Comment 6 Ed Morley [:emorley] 2012-02-03 11:41:25 PST

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