Index: src/extensions/gc-extension.cc |
diff --git a/src/extensions/gc-extension.cc b/src/extensions/gc-extension.cc |
index fbe40a6195397be966c60dfadebd571649162377..f4026f57dcb477ac3033122d90ef1c719d71579f 100644 |
--- a/src/extensions/gc-extension.cc |
+++ b/src/extensions/gc-extension.cc |
@@ -19,8 +19,11 @@ v8::Handle<v8::FunctionTemplate> GCExtension::GetNativeFunctionTemplate( |
void GCExtension::GC(const v8::FunctionCallbackInfo<v8::Value>& args) { |
args.GetIsolate()->RequestGarbageCollectionForTesting( |
- args[0]->BooleanValue() ? v8::Isolate::kMinorGarbageCollection |
- : v8::Isolate::kFullGarbageCollection); |
+ args[0] |
+ ->BooleanValue(args.GetIsolate()->GetCurrentContext()) |
+ .FromMaybe(false) |
+ ? v8::Isolate::kMinorGarbageCollection |
+ : v8::Isolate::kFullGarbageCollection); |
} |
} // namespace internal |