Commit a890034b authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[GetIsolate] Remove GetIsolate in src/debug

Bug: v8:7786
Change-Id: I369eb0bf32d89603b6b944c2bb8fe402a16e429b
Reviewed-on: https://chromium-review.googlesource.com/1104423
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53880}
parent 48d66504
...@@ -44,7 +44,8 @@ MaybeHandle<Object> DebugEvaluate::Global(Isolate* isolate, ...@@ -44,7 +44,8 @@ MaybeHandle<Object> DebugEvaluate::Global(Isolate* isolate,
context); context);
if (throw_on_side_effect) isolate->debug()->StartSideEffectCheckMode(); if (throw_on_side_effect) isolate->debug()->StartSideEffectCheckMode();
MaybeHandle<Object> result = Execution::Call( MaybeHandle<Object> result = Execution::Call(
isolate, fun, Handle<JSObject>(context->global_proxy()), 0, nullptr); isolate, fun, Handle<JSObject>(context->global_proxy(), isolate), 0,
nullptr);
if (throw_on_side_effect) isolate->debug()->StopSideEffectCheckMode(); if (throw_on_side_effect) isolate->debug()->StopSideEffectCheckMode();
return result; return result;
} }
...@@ -72,7 +73,7 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate, ...@@ -72,7 +73,7 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
if (isolate->has_pending_exception()) return MaybeHandle<Object>(); if (isolate->has_pending_exception()) return MaybeHandle<Object>();
Handle<Context> context = context_builder.evaluation_context(); Handle<Context> context = context_builder.evaluation_context();
Handle<JSObject> receiver(context->global_proxy()); Handle<JSObject> receiver(context->global_proxy(), isolate);
MaybeHandle<Object> maybe_result = MaybeHandle<Object> maybe_result =
Evaluate(isolate, context_builder.outer_info(), context, receiver, source, Evaluate(isolate, context_builder.outer_info(), context, receiver, source,
throw_on_side_effect); throw_on_side_effect);
...@@ -115,7 +116,7 @@ MaybeHandle<Object> DebugEvaluate::WithTopmostArguments(Isolate* isolate, ...@@ -115,7 +116,7 @@ MaybeHandle<Object> DebugEvaluate::WithTopmostArguments(Isolate* isolate,
Handle<Context>(), Handle<StringSet>()); Handle<Context>(), Handle<StringSet>());
Handle<SharedFunctionInfo> outer_info( Handle<SharedFunctionInfo> outer_info(
native_context->empty_function()->shared(), isolate); native_context->empty_function()->shared(), isolate);
Handle<JSObject> receiver(native_context->global_proxy()); Handle<JSObject> receiver(native_context->global_proxy(), isolate);
const bool throw_on_side_effect = false; const bool throw_on_side_effect = false;
MaybeHandle<Object> maybe_result = MaybeHandle<Object> maybe_result =
Evaluate(isolate, outer_info, evaluation_context, receiver, source, Evaluate(isolate, outer_info, evaluation_context, receiver, source,
...@@ -170,7 +171,8 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate, ...@@ -170,7 +171,8 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate,
frame_inspector_(frame, inlined_jsframe_index, isolate), frame_inspector_(frame, inlined_jsframe_index, isolate),
scope_iterator_(isolate, &frame_inspector_, scope_iterator_(isolate, &frame_inspector_,
ScopeIterator::COLLECT_NON_LOCALS) { ScopeIterator::COLLECT_NON_LOCALS) {
Handle<Context> outer_context(frame_inspector_.GetFunction()->context()); Handle<Context> outer_context(frame_inspector_.GetFunction()->context(),
isolate);
evaluation_context_ = outer_context; evaluation_context_ = outer_context;
Factory* factory = isolate->factory(); Factory* factory = isolate->factory();
...@@ -856,7 +858,7 @@ bool BytecodeRequiresRuntimeCheck(interpreter::Bytecode bytecode) { ...@@ -856,7 +858,7 @@ bool BytecodeRequiresRuntimeCheck(interpreter::Bytecode bytecode) {
// static // static
SharedFunctionInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState( SharedFunctionInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState(
Handle<SharedFunctionInfo> info) { Isolate* isolate, Handle<SharedFunctionInfo> info) {
if (FLAG_trace_side_effect_free_debug_evaluate) { if (FLAG_trace_side_effect_free_debug_evaluate) {
PrintF("[debug-evaluate] Checking function %s for side effect.\n", PrintF("[debug-evaluate] Checking function %s for side effect.\n",
info->DebugName()->ToCString().get()); info->DebugName()->ToCString().get());
...@@ -865,7 +867,7 @@ SharedFunctionInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState( ...@@ -865,7 +867,7 @@ SharedFunctionInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState(
DCHECK(info->is_compiled()); DCHECK(info->is_compiled());
if (info->HasBytecodeArray()) { if (info->HasBytecodeArray()) {
// Check bytecodes against whitelist. // Check bytecodes against whitelist.
Handle<BytecodeArray> bytecode_array(info->GetBytecodeArray()); Handle<BytecodeArray> bytecode_array(info->GetBytecodeArray(), isolate);
if (FLAG_trace_side_effect_free_debug_evaluate) bytecode_array->Print(); if (FLAG_trace_side_effect_free_debug_evaluate) bytecode_array->Print();
bool requires_runtime_checks = false; bool requires_runtime_checks = false;
for (interpreter::BytecodeArrayIterator it(bytecode_array); !it.done(); for (interpreter::BytecodeArrayIterator it(bytecode_array); !it.done();
...@@ -914,7 +916,6 @@ SharedFunctionInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState( ...@@ -914,7 +916,6 @@ SharedFunctionInfo::SideEffectState DebugEvaluate::FunctionGetSideEffectState(
BuiltinGetSideEffectState(static_cast<Builtins::Name>(builtin_index)); BuiltinGetSideEffectState(static_cast<Builtins::Name>(builtin_index));
#ifdef DEBUG #ifdef DEBUG
if (state == SharedFunctionInfo::kHasNoSideEffect) { if (state == SharedFunctionInfo::kHasNoSideEffect) {
Isolate* isolate = info->GetIsolate();
Code* code = isolate->builtins()->builtin(builtin_index); Code* code = isolate->builtins()->builtin(builtin_index);
if (code->builtin_index() == Builtins::kDeserializeLazy) { if (code->builtin_index() == Builtins::kDeserializeLazy) {
// Target builtin is not yet deserialized. Deserialize it now. // Target builtin is not yet deserialized. Deserialize it now.
......
...@@ -40,7 +40,7 @@ class DebugEvaluate : public AllStatic { ...@@ -40,7 +40,7 @@ class DebugEvaluate : public AllStatic {
Handle<String> source); Handle<String> source);
static SharedFunctionInfo::SideEffectState FunctionGetSideEffectState( static SharedFunctionInfo::SideEffectState FunctionGetSideEffectState(
Handle<SharedFunctionInfo> info); Isolate* isolate, Handle<SharedFunctionInfo> info);
static bool CallbackHasNoSideEffect(Object* callback_info); static bool CallbackHasNoSideEffect(Object* callback_info);
static void ApplySideEffectChecks(Handle<BytecodeArray> bytecode_array); static void ApplySideEffectChecks(Handle<BytecodeArray> bytecode_array);
......
...@@ -46,7 +46,7 @@ Handle<Object> ScopeIterator::GetFunctionDebugName() const { ...@@ -46,7 +46,7 @@ Handle<Object> ScopeIterator::GetFunctionDebugName() const {
if (!context_->IsNativeContext()) { if (!context_->IsNativeContext()) {
DisallowHeapAllocation no_gc; DisallowHeapAllocation no_gc;
ScopeInfo* closure_info = context_->closure_context()->scope_info(); ScopeInfo* closure_info = context_->closure_context()->scope_info();
Handle<String> debug_name(closure_info->FunctionDebugName()); Handle<String> debug_name(closure_info->FunctionDebugName(), isolate_);
if (debug_name->length() > 0) return debug_name; if (debug_name->length() > 0) return debug_name;
} }
return isolate_->factory()->undefined_value(); return isolate_->factory()->undefined_value();
...@@ -54,8 +54,8 @@ Handle<Object> ScopeIterator::GetFunctionDebugName() const { ...@@ -54,8 +54,8 @@ Handle<Object> ScopeIterator::GetFunctionDebugName() const {
ScopeIterator::ScopeIterator(Isolate* isolate, Handle<JSFunction> function) ScopeIterator::ScopeIterator(Isolate* isolate, Handle<JSFunction> function)
: isolate_(isolate), : isolate_(isolate),
context_(function->context()), context_(function->context(), isolate),
script_(Script::cast(function->shared()->script())) { script_(Script::cast(function->shared()->script()), isolate) {
if (!function->shared()->IsSubjectToDebugging()) { if (!function->shared()->IsSubjectToDebugging()) {
context_ = Handle<Context>(); context_ = Handle<Context>();
return; return;
...@@ -67,9 +67,9 @@ ScopeIterator::ScopeIterator(Isolate* isolate, ...@@ -67,9 +67,9 @@ ScopeIterator::ScopeIterator(Isolate* isolate,
Handle<JSGeneratorObject> generator) Handle<JSGeneratorObject> generator)
: isolate_(isolate), : isolate_(isolate),
generator_(generator), generator_(generator),
function_(generator->function()), function_(generator->function(), isolate),
context_(generator->context()), context_(generator->context(), isolate),
script_(Script::cast(function_->shared()->script())) { script_(Script::cast(function_->shared()->script()), isolate) {
if (!function_->shared()->IsSubjectToDebugging()) { if (!function_->shared()->IsSubjectToDebugging()) {
context_ = Handle<Context>(); context_ = Handle<Context>();
return; return;
...@@ -88,8 +88,8 @@ void ScopeIterator::Restart() { ...@@ -88,8 +88,8 @@ void ScopeIterator::Restart() {
void ScopeIterator::TryParseAndRetrieveScopes(ScopeIterator::Option option) { void ScopeIterator::TryParseAndRetrieveScopes(ScopeIterator::Option option) {
// Catch the case when the debugger stops in an internal function. // Catch the case when the debugger stops in an internal function.
Handle<SharedFunctionInfo> shared_info(function_->shared()); Handle<SharedFunctionInfo> shared_info(function_->shared(), isolate_);
Handle<ScopeInfo> scope_info(shared_info->scope_info()); Handle<ScopeInfo> scope_info(shared_info->scope_info(), isolate_);
if (shared_info->script()->IsUndefined(isolate_)) { if (shared_info->script()->IsUndefined(isolate_)) {
current_scope_ = closure_scope_ = nullptr; current_scope_ = closure_scope_ = nullptr;
context_ = handle(function_->context(), isolate_); context_ = handle(function_->context(), isolate_);
...@@ -106,7 +106,7 @@ void ScopeIterator::TryParseAndRetrieveScopes(ScopeIterator::Option option) { ...@@ -106,7 +106,7 @@ void ScopeIterator::TryParseAndRetrieveScopes(ScopeIterator::Option option) {
// inspect the function scope. // inspect the function scope.
// This can only happen if we set a break point inside right before the // This can only happen if we set a break point inside right before the
// return, which requires a debug info to be available. // return, which requires a debug info to be available.
Handle<DebugInfo> debug_info(shared_info->GetDebugInfo()); Handle<DebugInfo> debug_info(shared_info->GetDebugInfo(), isolate_);
// Find the break point where execution has stopped. // Find the break point where execution has stopped.
BreakLocation location = BreakLocation::FromFrame(debug_info, GetFrame()); BreakLocation location = BreakLocation::FromFrame(debug_info, GetFrame());
...@@ -121,7 +121,7 @@ void ScopeIterator::TryParseAndRetrieveScopes(ScopeIterator::Option option) { ...@@ -121,7 +121,7 @@ void ScopeIterator::TryParseAndRetrieveScopes(ScopeIterator::Option option) {
info_ = new ParseInfo(isolate_, shared_info); info_ = new ParseInfo(isolate_, shared_info);
} else { } else {
// Global or eval code. // Global or eval code.
Handle<Script> script(Script::cast(shared_info->script())); Handle<Script> script(Script::cast(shared_info->script()), isolate_);
info_ = new ParseInfo(isolate_, script); info_ = new ParseInfo(isolate_, script);
if (scope_info->scope_type() == EVAL_SCOPE) { if (scope_info->scope_type() == EVAL_SCOPE) {
info_->set_eval(); info_->set_eval();
...@@ -547,7 +547,7 @@ void ScopeIterator::VisitScriptScope(const Visitor& visitor) const { ...@@ -547,7 +547,7 @@ void ScopeIterator::VisitScriptScope(const Visitor& visitor) const {
context_index++) { context_index++) {
Handle<Context> context = Handle<Context> context =
ScriptContextTable::GetContext(script_contexts, context_index); ScriptContextTable::GetContext(script_contexts, context_index);
Handle<ScopeInfo> scope_info(context->scope_info()); Handle<ScopeInfo> scope_info(context->scope_info(), isolate_);
if (VisitContextLocals(visitor, scope_info, context)) return; if (VisitContextLocals(visitor, scope_info, context)) return;
} }
} }
...@@ -555,7 +555,7 @@ void ScopeIterator::VisitScriptScope(const Visitor& visitor) const { ...@@ -555,7 +555,7 @@ void ScopeIterator::VisitScriptScope(const Visitor& visitor) const {
void ScopeIterator::VisitModuleScope(const Visitor& visitor) const { void ScopeIterator::VisitModuleScope(const Visitor& visitor) const {
DCHECK(context_->IsModuleContext()); DCHECK(context_->IsModuleContext());
Handle<ScopeInfo> scope_info(context_->scope_info()); Handle<ScopeInfo> scope_info(context_->scope_info(), isolate_);
if (VisitContextLocals(visitor, scope_info, context_)) return; if (VisitContextLocals(visitor, scope_info, context_)) return;
int count_index = scope_info->ModuleVariableCountIndex(); int count_index = scope_info->ModuleVariableCountIndex();
...@@ -585,7 +585,7 @@ bool ScopeIterator::VisitContextLocals(const Visitor& visitor, ...@@ -585,7 +585,7 @@ bool ScopeIterator::VisitContextLocals(const Visitor& visitor,
Handle<Context> context) const { Handle<Context> context) const {
// Fill all context locals to the context extension. // Fill all context locals to the context extension.
for (int i = 0; i < scope_info->ContextLocalCount(); ++i) { for (int i = 0; i < scope_info->ContextLocalCount(); ++i) {
Handle<String> name(scope_info->ContextLocalName(i)); Handle<String> name(scope_info->ContextLocalName(i), isolate_);
if (ScopeInfo::VariableIsSynthetic(*name)) continue; if (ScopeInfo::VariableIsSynthetic(*name)) continue;
int context_index = Context::MIN_CONTEXT_SLOTS + i; int context_index = Context::MIN_CONTEXT_SLOTS + i;
Handle<Object> value(context->get(context_index), isolate_); Handle<Object> value(context->get(context_index), isolate_);
...@@ -759,7 +759,7 @@ void ScopeIterator::VisitLocalScope(const Visitor& visitor, Mode mode) const { ...@@ -759,7 +759,7 @@ void ScopeIterator::VisitLocalScope(const Visitor& visitor, Mode mode) const {
for (int i = 0; i < keys->length(); i++) { for (int i = 0; i < keys->length(); i++) {
// Names of variables introduced by eval are strings. // Names of variables introduced by eval are strings.
DCHECK(keys->get(i)->IsString()); DCHECK(keys->get(i)->IsString());
Handle<String> key(String::cast(keys->get(i))); Handle<String> key(String::cast(keys->get(i)), isolate_);
Handle<Object> value = JSReceiver::GetDataProperty(extension, key); Handle<Object> value = JSReceiver::GetDataProperty(extension, key);
if (visitor(key, value)) return; if (visitor(key, value)) return;
} }
...@@ -890,7 +890,8 @@ bool ScopeIterator::SetModuleVariableValue(Handle<String> variable_name, ...@@ -890,7 +890,8 @@ bool ScopeIterator::SetModuleVariableValue(Handle<String> variable_name,
bool ScopeIterator::SetScriptVariableValue(Handle<String> variable_name, bool ScopeIterator::SetScriptVariableValue(Handle<String> variable_name,
Handle<Object> new_value) { Handle<Object> new_value) {
Handle<ScriptContextTable> script_contexts( Handle<ScriptContextTable> script_contexts(
context_->global_object()->native_context()->script_context_table()); context_->global_object()->native_context()->script_context_table(),
isolate_);
ScriptContextTable::LookupResult lookup_result; ScriptContextTable::LookupResult lookup_result;
if (ScriptContextTable::Lookup(script_contexts, variable_name, if (ScriptContextTable::Lookup(script_contexts, variable_name,
&lookup_result)) { &lookup_result)) {
......
...@@ -84,7 +84,7 @@ v8::MaybeLocal<v8::Value> DebugStackTraceIterator::GetReceiver() const { ...@@ -84,7 +84,7 @@ v8::MaybeLocal<v8::Value> DebugStackTraceIterator::GetReceiver() const {
// So let's try to fetch it using same logic as is used to retrieve 'this' // So let's try to fetch it using same logic as is used to retrieve 'this'
// during DebugEvaluate::Local. // during DebugEvaluate::Local.
Handle<JSFunction> function = frame_inspector_->GetFunction(); Handle<JSFunction> function = frame_inspector_->GetFunction();
Handle<Context> context(function->context()); Handle<Context> context(function->context(), isolate_);
// Arrow function defined in top level function without references to // Arrow function defined in top level function without references to
// variables may have NativeContext as context. // variables may have NativeContext as context.
if (!context->IsFunctionContext()) return v8::MaybeLocal<v8::Value>(); if (!context->IsFunctionContext()) return v8::MaybeLocal<v8::Value>();
...@@ -95,7 +95,7 @@ v8::MaybeLocal<v8::Value> DebugStackTraceIterator::GetReceiver() const { ...@@ -95,7 +95,7 @@ v8::MaybeLocal<v8::Value> DebugStackTraceIterator::GetReceiver() const {
if (!scope_iterator.GetNonLocals()->Has(isolate_->factory()->this_string())) if (!scope_iterator.GetNonLocals()->Has(isolate_->factory()->this_string()))
return v8::MaybeLocal<v8::Value>(); return v8::MaybeLocal<v8::Value>();
Handle<ScopeInfo> scope_info(context->scope_info()); Handle<ScopeInfo> scope_info(context->scope_info(), isolate_);
VariableMode mode; VariableMode mode;
InitializationFlag flag; InitializationFlag flag;
MaybeAssignedFlag maybe_assigned_flag; MaybeAssignedFlag maybe_assigned_flag;
......
This diff is collapsed.
...@@ -170,7 +170,7 @@ class BreakIterator { ...@@ -170,7 +170,7 @@ class BreakIterator {
// weak handles to avoid a debug info object to keep a function alive. // weak handles to avoid a debug info object to keep a function alive.
class DebugInfoListNode { class DebugInfoListNode {
public: public:
explicit DebugInfoListNode(DebugInfo* debug_info); DebugInfoListNode(Isolate* isolate, DebugInfo* debug_info);
~DebugInfoListNode(); ~DebugInfoListNode();
DebugInfoListNode* next() { return next_; } DebugInfoListNode* next() { return next_; }
...@@ -295,7 +295,7 @@ class Debug { ...@@ -295,7 +295,7 @@ class Debug {
int position); int position);
static Handle<Object> GetSourceBreakLocations( static Handle<Object> GetSourceBreakLocations(
Handle<SharedFunctionInfo> shared); Isolate* isolate, Handle<SharedFunctionInfo> shared);
// Check whether a global object is the debug global object. // Check whether a global object is the debug global object.
bool IsDebugGlobal(JSGlobalObject* global); bool IsDebugGlobal(JSGlobalObject* global);
......
This diff is collapsed.
...@@ -77,12 +77,13 @@ class LiveEdit : AllStatic { ...@@ -77,12 +77,13 @@ class LiveEdit : AllStatic {
static void InitializeThreadLocal(Debug* debug); static void InitializeThreadLocal(Debug* debug);
V8_WARN_UNUSED_RESULT static MaybeHandle<JSArray> GatherCompileInfo( V8_WARN_UNUSED_RESULT static MaybeHandle<JSArray> GatherCompileInfo(
Handle<Script> script, Handle<String> source); Isolate* isolate, Handle<Script> script, Handle<String> source);
static void ReplaceFunctionCode(Handle<JSArray> new_compile_info_array, static void ReplaceFunctionCode(Handle<JSArray> new_compile_info_array,
Handle<JSArray> shared_info_array); Handle<JSArray> shared_info_array);
static void FixupScript(Handle<Script> script, int max_function_literal_id); static void FixupScript(Isolate* isolate, Handle<Script> script,
int max_function_literal_id);
static void FunctionSourceUpdated(Handle<JSArray> shared_info_array, static void FunctionSourceUpdated(Handle<JSArray> shared_info_array,
int new_function_literal_id); int new_function_literal_id);
...@@ -97,7 +98,8 @@ class LiveEdit : AllStatic { ...@@ -97,7 +98,8 @@ class LiveEdit : AllStatic {
// For a script updates its source field. If old_script_name is provided // For a script updates its source field. If old_script_name is provided
// (i.e. is a String), also creates a copy of the script with its original // (i.e. is a String), also creates a copy of the script with its original
// source and sends notification to debugger. // source and sends notification to debugger.
static Handle<Object> ChangeScriptSource(Handle<Script> original_script, static Handle<Object> ChangeScriptSource(Isolate* isolate,
Handle<Script> original_script,
Handle<String> new_source, Handle<String> new_source,
Handle<Object> old_script_name); Handle<Object> old_script_name);
...@@ -110,7 +112,8 @@ class LiveEdit : AllStatic { ...@@ -110,7 +112,8 @@ class LiveEdit : AllStatic {
// Find open generator activations, and set corresponding "result" elements to // Find open generator activations, and set corresponding "result" elements to
// FUNCTION_BLOCKED_ACTIVE_GENERATOR. // FUNCTION_BLOCKED_ACTIVE_GENERATOR.
static bool FindActiveGenerators(Handle<FixedArray> shared_info_array, static bool FindActiveGenerators(Isolate* isolate,
Handle<FixedArray> shared_info_array,
Handle<FixedArray> result, int len); Handle<FixedArray> result, int len);
// Checks listed functions on stack and return array with corresponding // Checks listed functions on stack and return array with corresponding
...@@ -141,7 +144,7 @@ class LiveEdit : AllStatic { ...@@ -141,7 +144,7 @@ class LiveEdit : AllStatic {
// Compares 2 strings line-by-line, then token-wise and returns diff in form // Compares 2 strings line-by-line, then token-wise and returns diff in form
// of array of triplets (pos1, pos1_end, pos2_end) describing list // of array of triplets (pos1, pos1_end, pos2_end) describing list
// of diff chunks. // of diff chunks.
static Handle<JSArray> CompareStrings(Handle<String> s1, static Handle<JSArray> CompareStrings(Isolate* isolate, Handle<String> s1,
Handle<String> s2); Handle<String> s2);
// Architecture-specific constant. // Architecture-specific constant.
...@@ -254,7 +257,7 @@ class FunctionInfoWrapper : public JSArrayBasedStruct<FunctionInfoWrapper> { ...@@ -254,7 +257,7 @@ class FunctionInfoWrapper : public JSArrayBasedStruct<FunctionInfoWrapper> {
this->SetField(kFunctionScopeInfoOffset_, scope_info_array); this->SetField(kFunctionScopeInfoOffset_, scope_info_array);
} }
void SetSharedFunctionInfo(Handle<SharedFunctionInfo> info); void SetSharedFunctionInfo(Isolate* isolate, Handle<SharedFunctionInfo> info);
Handle<SharedFunctionInfo> GetSharedFunctionInfo(); Handle<SharedFunctionInfo> GetSharedFunctionInfo();
......
...@@ -13721,10 +13721,10 @@ String* SharedFunctionInfo::DebugName() { ...@@ -13721,10 +13721,10 @@ String* SharedFunctionInfo::DebugName() {
// static // static
SharedFunctionInfo::SideEffectState SharedFunctionInfo::GetSideEffectState( SharedFunctionInfo::SideEffectState SharedFunctionInfo::GetSideEffectState(
Handle<SharedFunctionInfo> info) { Isolate* isolate, Handle<SharedFunctionInfo> info) {
if (info->side_effect_state() == kNotComputed) { if (info->side_effect_state() == kNotComputed) {
SharedFunctionInfo::SideEffectState has_no_side_effect = SharedFunctionInfo::SideEffectState has_no_side_effect =
DebugEvaluate::FunctionGetSideEffectState(info); DebugEvaluate::FunctionGetSideEffectState(isolate, info);
info->set_side_effect_state(has_no_side_effect); info->set_side_effect_state(has_no_side_effect);
} }
return static_cast<SideEffectState>(info->side_effect_state()); return static_cast<SideEffectState>(info->side_effect_state());
......
...@@ -282,7 +282,8 @@ class SharedFunctionInfo : public HeapObject { ...@@ -282,7 +282,8 @@ class SharedFunctionInfo : public HeapObject {
kRequiresRuntimeChecks = 2, kRequiresRuntimeChecks = 2,
kHasNoSideEffect = 3, kHasNoSideEffect = 3,
}; };
static SideEffectState GetSideEffectState(Handle<SharedFunctionInfo> info); static SideEffectState GetSideEffectState(Isolate* isolate,
Handle<SharedFunctionInfo> info);
// Used for flags such as --turbo-filter. // Used for flags such as --turbo-filter.
bool PassesFilter(const char* raw_filter); bool PassesFilter(const char* raw_filter);
......
...@@ -387,7 +387,8 @@ RUNTIME_FUNCTION(Runtime_GetBreakLocations) { ...@@ -387,7 +387,8 @@ RUNTIME_FUNCTION(Runtime_GetBreakLocations) {
Handle<SharedFunctionInfo> shared(fun->shared()); Handle<SharedFunctionInfo> shared(fun->shared());
// Find the number of break points // Find the number of break points
Handle<Object> break_locations = Debug::GetSourceBreakLocations(shared); Handle<Object> break_locations =
Debug::GetSourceBreakLocations(isolate, shared);
if (break_locations->IsUndefined(isolate)) { if (break_locations->IsUndefined(isolate)) {
return isolate->heap()->undefined_value(); return isolate->heap()->undefined_value();
} }
......
...@@ -71,8 +71,8 @@ RUNTIME_FUNCTION(Runtime_LiveEditGatherCompileInfo) { ...@@ -71,8 +71,8 @@ RUNTIME_FUNCTION(Runtime_LiveEditGatherCompileInfo) {
CHECK(script->value()->IsScript()); CHECK(script->value()->IsScript());
Handle<Script> script_handle(Script::cast(script->value()), isolate); Handle<Script> script_handle(Script::cast(script->value()), isolate);
RETURN_RESULT_OR_FAILURE(isolate, RETURN_RESULT_OR_FAILURE(
LiveEdit::GatherCompileInfo(script_handle, source)); isolate, LiveEdit::GatherCompileInfo(isolate, script_handle, source));
} }
...@@ -91,7 +91,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditReplaceScript) { ...@@ -91,7 +91,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditReplaceScript) {
Handle<Script> original_script(Script::cast(original_script_value->value())); Handle<Script> original_script(Script::cast(original_script_value->value()));
Handle<Object> old_script = LiveEdit::ChangeScriptSource( Handle<Object> old_script = LiveEdit::ChangeScriptSource(
original_script, new_source, old_script_name); isolate, original_script, new_source, old_script_name);
if (old_script->IsScript()) { if (old_script->IsScript()) {
Handle<Script> script_handle = Handle<Script>::cast(old_script); Handle<Script> script_handle = Handle<Script>::cast(old_script);
...@@ -113,7 +113,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFixupScript) { ...@@ -113,7 +113,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFixupScript) {
CHECK(script_value->value()->IsScript()); CHECK(script_value->value()->IsScript());
Handle<Script> script(Script::cast(script_value->value())); Handle<Script> script(Script::cast(script_value->value()));
LiveEdit::FixupScript(script, max_function_literal_id); LiveEdit::FixupScript(isolate, script, max_function_literal_id);
return isolate->heap()->undefined_value(); return isolate->heap()->undefined_value();
} }
...@@ -257,7 +257,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditCompareStrings) { ...@@ -257,7 +257,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditCompareStrings) {
CONVERT_ARG_HANDLE_CHECKED(String, s1, 0); CONVERT_ARG_HANDLE_CHECKED(String, s1, 0);
CONVERT_ARG_HANDLE_CHECKED(String, s2, 1); CONVERT_ARG_HANDLE_CHECKED(String, s2, 1);
Handle<JSArray> result = LiveEdit::CompareStrings(s1, s2); Handle<JSArray> result = LiveEdit::CompareStrings(isolate, s1, s2);
uint32_t array_length = 0; uint32_t array_length = 0;
CHECK(result->length()->ToArrayLength(&array_length)); CHECK(result->length()->ToArrayLength(&array_length));
if (array_length > 0) { if (array_length > 0) {
......
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