| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index ccafff1c805d23aedb22d6950fd8bab1a480c4d1..5d0d4904f7bc4db3aa5e838d782825ebbf7520e5 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -2194,9 +2194,10 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
|
| }
|
| has_pending_exception = result.is_null();
|
| if (has_pending_exception) isolate->ReportPendingMessages();
|
| - RETURN_ON_FAILED_EXECUTION(Script);
|
|
|
| - source->info->clear_script(); // because script goes out of scope.
|
| + source->Release();
|
| +
|
| + RETURN_ON_FAILED_EXECUTION(Script);
|
|
|
| Local<UnboundScript> generic = ToApiHandle<UnboundScript>(result);
|
| if (generic.IsEmpty()) return Local<Script>();
|
|
|