Skip to content

Commit

Permalink
* 修复不在回调内调用jsGetWebView会导致崩溃的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
weolar committed Jun 27, 2018
1 parent 6be529b commit 130b202
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wke/wkeJsBind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,10 +984,11 @@ wkeWebView jsGetWebView(jsExecState es)
DebugBreak();

v8::Isolate* isolate = es->isolate;
v8::Local<v8::Context> context = v8::Local<v8::Context>::New(es->isolate, es->context);

v8::HandleScope handleScope(isolate);

v8::Local<v8::Context> context = v8::Local<v8::Context>::New(es->isolate, es->context);
v8::Context::Scope contextScope(context);

v8::Local<v8::Object> globalObj = context->Global();

v8::MaybeLocal<v8::String> nameMaybeLocal = v8::String::NewFromUtf8(isolate, "wkeWebViewToV8Context", v8::NewStringType::kNormal, -1);
Expand Down

0 comments on commit 130b202

Please sign in to comment.