Bug 27793
Summary: | Inspector: Cannot access properties of a wrapped callback function return value | ||
---|---|---|---|
Product: | WebKit | Reporter: | Keishi Hattori <keishi> |
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | burg |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Keishi Hattori
I think this is because JSInspectorCallbackWrapper wraps the return value (except for primitive values) with JSInspectorCallbackWrapper and the attributes like allowsGetPropertyNames and allowsGetProperty are set to false.
JSInspectorCallbackWrapper wraps a function in the "inspector" that gets called from the "inspected window".
I think the expected behavior for the wrapping of each type of return value is
1. Primitive value -> return unwrapped
2. Object from "inspected window" -> return unwrapped
3. Function from "inspector" -> wrap with JSInspectorCallbackWrapper
4. Object(not function) from "inspector" -> wrap with JSInspectorCallbackWrapper? I don't think this case should happen at all.
Current behavior seems to be
1. Primitive value -> return unwrapped
2. Object from "inspected window" -> wrap with JSInspectorCallbackWrapper
3. Function from "inspector" -> wrap with JSInspectorCallbackWrapper
4. Object(not function) from "inspector" -> wrap with JSInspectorCallbackWrapper
Conclusion:
We should modify JSInspectorCallbackWrapper so that it the return value is unwrapped if it is an object from the "inspected window".
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Timothy Hatcher
The plan is to kill JSInspectorCallbackWrapper soon…