mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
Move IsExternal check to FromV8ValueImpl
This commit is contained in:
@@ -262,6 +262,9 @@ base::Value* V8ValueConverter::FromV8ValueImpl(
|
||||
if (state->HasReachedMaxRecursionDepth())
|
||||
return nullptr;
|
||||
|
||||
if (val->IsExternal())
|
||||
return base::Value::CreateNullValue().release();
|
||||
|
||||
if (val->IsNull())
|
||||
return base::Value::CreateNullValue().release();
|
||||
|
||||
@@ -415,11 +418,6 @@ base::Value* V8ValueConverter::FromV8Object(
|
||||
child_v8 = v8::Null(isolate);
|
||||
}
|
||||
|
||||
// Ignore external values since calling CreationContext() on them can
|
||||
// crash
|
||||
if (child_v8->IsExternal())
|
||||
continue;
|
||||
|
||||
std::unique_ptr<base::Value> child(
|
||||
FromV8ValueImpl(state, child_v8, isolate));
|
||||
if (!child.get())
|
||||
|
||||
Reference in New Issue
Block a user