File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ using blink::WebView;
40
40
namespace {
41
41
RenderView* GetRenderView (v8::Handle<v8::Context> ctx) {
42
42
WebLocalFrame* frame = WebLocalFrame::frameForContext (ctx);
43
- if (!frame)
43
+ if (!frame || !frame-> isNodeJS () )
44
44
return NULL ;
45
45
46
46
WebView* view = frame->view ();
Original file line number Diff line number Diff line change @@ -453,6 +453,13 @@ void DispatcherBindings::CallStaticMethod(
453
453
// static
454
454
void DispatcherBindings::CrashRenderer (
455
455
const v8::FunctionCallbackInfo<v8::Value>& args) {
456
+ v8::Isolate* isolate = v8::Isolate::GetCurrent ();
457
+ RenderView* render_view = GetCurrentRenderView ();
458
+ if (!render_view) {
459
+ args.GetReturnValue ().Set (isolate->ThrowException (v8::Exception::Error (v8::String::NewFromUtf8 (isolate,
460
+ " Unable to get render view in CallObjectMethod" ))));
461
+ return ;
462
+ }
456
463
int * ptr = NULL ;
457
464
*ptr = 1 ;
458
465
}
You can’t perform that action at this time.
0 commit comments