V8 Debug Protocol "scope" occur forced termination in Android

11 views
Skip to first unread message

Vincent Han

unread,
Nov 10, 2010, 3:30:07 AM11/10/10
to v8-users
"scope" and some other protocol occur forced termination in Android.

My analysis is like below.

First of all, a major cause is "JavaScriptFrameIterator
frame_it(id);"
in Runtime_GetScopeCount function.
The reason of above is "id" after doing below.
- StackFrame::Id id = UnwrapFrameId(wrapped_id);
A parameter of Runtime_GetScopeCount function is "args".
→ args[0]: this.break_id_, args[1]: this.frameId() (in Mirror-
debug.js)
When args[1] is zero(frameId is zero), wrapped_id is zero.
- CONVERT_CHECKED(Smi, wrapped_id, args[1]);
Then id become zero after UnwrapFrameId(wrapped_id).
I think above routine got some problem.

Now, look at Runtime_GetFrameDetails function.
There is id got some values.
Then, make frame_id using id through WrapFrameId function.
- frame_id value is zero.
And set frame_id to details[kFrameDetailsFrameIdIndex].
I thiink args[1] of Runtime_GetScopeCount using that frame_id(zero).

Is it a right processing?
Or some protocols have restrictions before requesting.

Please help me.

Vyacheslav Egorov

unread,
Nov 10, 2010, 5:07:32 AM11/10/10
to v8-u...@googlegroups.com
Hi Vincent,

Which version of V8 are you using? Did you build it yourself or you use prebuilt binary?

We had similar issue with WrapFrameId being optimized away with value range propagation optimization in GCC 4.4. 


--
Vyacheslav Egorov


Vincent Han

unread,
Nov 10, 2010, 5:48:21 AM11/10/10
to v8-users
Thanks for reply and great answer.



On 11월10일, 오후7시07분, Vyacheslav Egorov <vego...@chromium.org> wrote:
> Hi Vincent,
>
> Which version of V8 are you using? Did you build it yourself or you use
> prebuilt binary?
>
> We had similar issue with WrapFrameId being optimized away with value range
> propagation optimization in GCC 4.4.
>
> We fixed it inhttp://code.google.com/p/v8/source/detail?r=5278
Reply all
Reply to author
Forward
0 new messages