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

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, 8 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 int JavaScriptCallFrame::line() const 68 int JavaScriptCallFrame::line() const
69 { 69 {
70 return callV8FunctionReturnInt("line"); 70 return callV8FunctionReturnInt("line");
71 } 71 }
72 72
73 int JavaScriptCallFrame::column() const 73 int JavaScriptCallFrame::column() const
74 { 74 {
75 return callV8FunctionReturnInt("column"); 75 return callV8FunctionReturnInt("column");
76 } 76 }
77 77
78 int JavaScriptCallFrame::contextId() const
79 {
80 return callV8FunctionReturnInt("contextId");
81 }
82
78 bool JavaScriptCallFrame::isAtReturn() const 83 bool JavaScriptCallFrame::isAtReturn() const
79 { 84 {
80 v8::HandleScope handleScope(m_isolate); 85 v8::HandleScope handleScope(m_isolate);
81 v8::Local<v8::Value> result = v8::Local<v8::Object>::New(m_isolate, m_callFr ame)->Get(toV8StringInternalized(m_isolate, "isAtReturn")); 86 v8::Local<v8::Value> result = v8::Local<v8::Object>::New(m_isolate, m_callFr ame)->Get(toV8StringInternalized(m_isolate, "isAtReturn"));
82 if (result.IsEmpty() || !result->IsBoolean()) 87 if (result.IsEmpty() || !result->IsBoolean())
83 return false; 88 return false;
84 return result->BooleanValue(); 89 return result->BooleanValue();
85 } 90 }
86 91
87 v8::Local<v8::Object> JavaScriptCallFrame::details() const 92 v8::Local<v8::Object> JavaScriptCallFrame::details() const
(...skipping 30 matching lines...) Expand all
118 v8::Local<v8::Function> setVariableValueFunction = v8::Local<v8::Function>:: Cast(callFrame->Get(toV8StringInternalized(m_isolate, "setVariableValue"))); 123 v8::Local<v8::Function> setVariableValueFunction = v8::Local<v8::Function>:: Cast(callFrame->Get(toV8StringInternalized(m_isolate, "setVariableValue")));
119 v8::Local<v8::Value> argv[] = { 124 v8::Local<v8::Value> argv[] = {
120 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), 125 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)),
121 variableName, 126 variableName,
122 newValue 127 newValue
123 }; 128 };
124 return setVariableValueFunction->Call(m_isolate->GetCurrentContext(), callFr ame, WTF_ARRAY_LENGTH(argv), argv); 129 return setVariableValueFunction->Call(m_isolate->GetCurrentContext(), callFr ame, WTF_ARRAY_LENGTH(argv), argv);
125 } 130 }
126 131
127 } // namespace blink 132 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698