Skip to content

Commit 4c14c6f

Browse files
committed
handle return v8 value correctly
or it will crash in v8 win dbg
1 parent 0298d5f commit 4c14c6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/bindings_common.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ base::StringPiece GetStringResource(int resource_id) {
6969
namespace remote {
7070

7171
v8::Handle<v8::Value> AllocateId(int routing_id) {
72-
v8::HandleScope handle_scope;
72+
v8::HandleScope scope;
7373

7474
int result = 0;
7575
RenderThread::Get()->Send(new ShellViewHostMsg_AllocateId(
7676
routing_id,
7777
&result));
78-
return v8::Integer::New(result);
78+
return scope.Close(v8::Integer::New(result));
7979
}
8080

8181
v8::Handle<v8::Value> AllocateObject(int routing_id,

0 commit comments

Comments
 (0)