Closed
Bug 688691
Opened 14 years ago
Closed 12 years ago
Add a warning using nsIDocument::WarnOnceAbout when we allow unwrapping to fail silently
Categories
(Core :: XPConnect, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
5.37 KB,
patch
|
Ms2ger
:
review+
|
Details | Diff | Splinter Review |
![]() |
Assignee | |
Comment 1•14 years ago
|
||
So what this needs is a way to go from a JSObject to an nsIDocument. I guess I could get the global and hope it's a Window, but do I want |obj| or |callee| to get the global from?
![]() |
Assignee | |
Comment 2•12 years ago
|
||
So I can add this but it will have no property name and no line/stack information... so I'm not sure how useful it will be.
![]() |
Assignee | |
Comment 3•12 years ago
|
||
Ah, maybe we'll have useful line info somehow by magic! That certainly makes this a lot more useful!
![]() |
Assignee | |
Comment 4•12 years ago
|
||
Attachment #734269 -
Flags: review?(Ms2ger)
![]() |
Assignee | |
Updated•12 years ago
|
Whiteboard: [need review]
Comment 5•12 years ago
|
||
Comment on attachment 734269 [details] [diff] [review]
Warn when LenientThis actually causes us to not throw.
Review of attachment 734269 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/BindingUtils.cpp
@@ +1691,5 @@
> +void
> +ReportLenientThisUnwrappingFailure(JSContext* cx, JS::Handle<JSObject*> obj)
> +{
> + GlobalObject glob(cx, obj);
> + nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(glob.Get());
Nit: I'd have used 'global' and 'window'.
Attachment #734269 -
Flags: review?(Ms2ger) → review+
![]() |
Assignee | |
Comment 6•12 years ago
|
||
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla23
![]() |
||
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•