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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/V8JavaScriptCallFrame.cpp

Issue 1650283002: DevTools: remove DOM and Bindings dependencies from inspector/v8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/v8/V8JavaScriptCallFrame.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8JavaScriptCallFrame.cpp b/third_party/WebKit/Source/core/inspector/v8/V8JavaScriptCallFrame.cpp
index c6d6b5ad18335a88becb317e4e94cc8f89f8775f..8d535ac5ac86df7fc77cf28375d9152816106694 100644
--- a/third_party/WebKit/Source/core/inspector/v8/V8JavaScriptCallFrame.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/V8JavaScriptCallFrame.cpp
@@ -6,6 +6,7 @@
#include "core/inspector/v8/InspectorWrapper.h"
#include "core/inspector/v8/JavaScriptCallFrame.h"
+#include "core/inspector/v8/V8StringUtil.h"
#include "wtf/RefPtr.h"
#include "wtf/StdLibExtras.h"
#include <algorithm>
@@ -60,17 +61,13 @@ void thisObjectAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCa
void stepInPositionsAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
JavaScriptCallFrame* impl = V8JavaScriptCallFrame::unwrap(info.GetIsolate()->GetCurrentContext(), info.Holder());
- CString cstr = impl->stepInPositions().utf8();
- v8::Local<v8::Name> result = v8::String::NewFromUtf8(info.GetIsolate(), cstr.data(), v8::NewStringType::kNormal, cstr.length()).ToLocalChecked();
- info.GetReturnValue().Set(result);
+ info.GetReturnValue().Set(toV8String(info.GetIsolate(), impl->stepInPositions()));
}
void functionNameAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
JavaScriptCallFrame* impl = V8JavaScriptCallFrame::unwrap(info.GetIsolate()->GetCurrentContext(), info.Holder());
- CString cstr = impl->functionName().utf8();
- v8::Local<v8::Name> result = v8::String::NewFromUtf8(info.GetIsolate(), cstr.data(), v8::NewStringType::kNormal, cstr.length()).ToLocalChecked();
- info.GetReturnValue().Set(result);
+ info.GetReturnValue().Set(toV8String(info.GetIsolate(), impl->functionName()));
}
void functionLineAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)

Powered by Google App Engine
This is Rietveld 408576698