Commit 5031f608 authored by Jochen Eisinger's avatar Jochen Eisinger Committed by Commit Bot

Get rid of PREPARE_FOR_EXECUTION_WITH_ISOLATE

Replace the macro with more generic macros expanding to the same
code.

BUG=v8:5830
R=marja@chromium.org

Change-Id: Ibf31fa4d89960a025af859198e190910c5608a20
Reviewed-on: https://chromium-review.googlesource.com/518006
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45560}
parent 14fae589
......@@ -127,12 +127,6 @@ namespace v8 {
PREPARE_FOR_EXECUTION_GENERIC(isolate, context, class_name, function_name, \
bailout_value, HandleScopeClass, do_callback);
#define PREPARE_FOR_EXECUTION_WITH_ISOLATE(isolate, class_name, function_name, \
T) \
PREPARE_FOR_EXECUTION_GENERIC(isolate, Local<Context>(), class_name, \
function_name, MaybeLocal<T>(), \
InternalEscapableScope, false);
#define PREPARE_FOR_EXECUTION(context, class_name, function_name, T) \
PREPARE_FOR_EXECUTION_WITH_CONTEXT(context, class_name, function_name, \
MaybeLocal<T>(), InternalEscapableScope, \
......@@ -2138,10 +2132,10 @@ MaybeLocal<Value> Module::Evaluate(Local<Context> context) {
MaybeLocal<UnboundScript> ScriptCompiler::CompileUnboundInternal(
Isolate* v8_isolate, Source* source, CompileOptions options) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
PREPARE_FOR_EXECUTION_WITH_ISOLATE(isolate, ScriptCompiler, CompileUnbound,
UnboundScript);
TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
PREPARE_FOR_EXECUTION_WITH_CONTEXT_IN_RUNTIME_CALL_STATS_SCOPE(
"v8", "V8.ScriptCompiler", v8_isolate->GetCurrentContext(),
ScriptCompiler, CompileUnbound, MaybeLocal<UnboundScript>(),
InternalEscapableScope, false);
// Don't try to produce any kind of cache when the debugger is loaded.
if (isolate->debug()->is_loaded() &&
......@@ -3131,8 +3125,8 @@ bool NativeWeakMap::Delete(Local<Value> v8_key) {
// --- J S O N ---
MaybeLocal<Value> JSON::Parse(Isolate* v8_isolate, Local<String> json_string) {
auto isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
PREPARE_FOR_EXECUTION_WITH_ISOLATE(isolate, JSON, Parse, Value);
PREPARE_FOR_EXECUTION_WITH_CALLBACK(v8_isolate->GetCurrentContext(), JSON,
Parse, Value);
i::Handle<i::String> string = Utils::OpenHandle(*json_string);
i::Handle<i::String> source = i::String::Flatten(string);
i::Handle<i::Object> undefined = isolate->factory()->undefined_value();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment