Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp

Issue 1836653002: [DevTools] Wrap call frame with its injected script instead top injected script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compile-debugger-script
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 int JavaScriptCallFrame::line() const 78 int JavaScriptCallFrame::line() const
79 { 79 {
80 return callV8FunctionReturnInt("line"); 80 return callV8FunctionReturnInt("line");
81 } 81 }
82 82
83 int JavaScriptCallFrame::column() const 83 int JavaScriptCallFrame::column() const
84 { 84 {
85 return callV8FunctionReturnInt("column"); 85 return callV8FunctionReturnInt("column");
86 } 86 }
87 87
88 int JavaScriptCallFrame::contextId() const
89 {
90 return callV8FunctionReturnInt("contextId");
91 }
92
88 bool JavaScriptCallFrame::isAtReturn() const 93 bool JavaScriptCallFrame::isAtReturn() const
89 { 94 {
90 v8::HandleScope handleScope(m_isolate); 95 v8::HandleScope handleScope(m_isolate);
91 v8::Local<v8::Value> result = v8::Local<v8::Object>::New(m_isolate, m_callFr ame)->Get(toV8StringInternalized(m_isolate, "isAtReturn")); 96 v8::Local<v8::Value> result = v8::Local<v8::Object>::New(m_isolate, m_callFr ame)->Get(toV8StringInternalized(m_isolate, "isAtReturn"));
92 if (result.IsEmpty() || !result->IsBoolean()) 97 if (result.IsEmpty() || !result->IsBoolean())
93 return false; 98 return false;
94 return result->BooleanValue(); 99 return result->BooleanValue();
95 } 100 }
96 101
97 v8::Local<v8::Object> JavaScriptCallFrame::details() const 102 v8::Local<v8::Object> JavaScriptCallFrame::details() const
(...skipping 30 matching lines...) Expand all
128 v8::Local<v8::Function> setVariableValueFunction = v8::Local<v8::Function>:: Cast(callFrame->Get(toV8StringInternalized(m_isolate, "setVariableValue"))); 133 v8::Local<v8::Function> setVariableValueFunction = v8::Local<v8::Function>:: Cast(callFrame->Get(toV8StringInternalized(m_isolate, "setVariableValue")));
129 v8::Local<v8::Value> argv[] = { 134 v8::Local<v8::Value> argv[] = {
130 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), 135 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)),
131 variableName, 136 variableName,
132 newValue 137 newValue
133 }; 138 };
134 return setVariableValueFunction->Call(m_isolate->GetCurrentContext(), callFr ame, WTF_ARRAY_LENGTH(argv), argv); 139 return setVariableValueFunction->Call(m_isolate->GetCurrentContext(), callFr ame, WTF_ARRAY_LENGTH(argv), argv);
135 } 140 }
136 141
137 } // namespace blink 142 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698