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

Unified Diff: Source/bindings/v8/ScriptDebugServer.cpp

Issue 98853012: Revert of Remove uses of deprecated toWebCoreStringWithUndefinedOrNullCheck(v8::Handle<v8::Value>) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « Source/bindings/v8/PageScriptDebugServer.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptDebugServer.cpp
diff --git a/Source/bindings/v8/ScriptDebugServer.cpp b/Source/bindings/v8/ScriptDebugServer.cpp
index 157000c4b4a6d5ba7ec251556f0a2f139fa16b1d..11b48147d0ee3924ece7c3c9c4a8d2bfa450917e 100644
--- a/Source/bindings/v8/ScriptDebugServer.cpp
+++ b/Source/bindings/v8/ScriptDebugServer.cpp
@@ -298,23 +298,13 @@
// Compile error.
case 1:
{
- V8StringResource<WithUndefinedOrNullCheck> message(resultTuple->Get(2));
- if (!message.prepare()) {
- *error = "Unknown error.";
- return false;
- }
RefPtr<TypeBuilder::Debugger::SetScriptSourceError::CompileError> compileError =
TypeBuilder::Debugger::SetScriptSourceError::CompileError::create()
- .setMessage(message)
+ .setMessage(toWebCoreStringWithUndefinedOrNullCheck(resultTuple->Get(2)))
.setLineNumber(resultTuple->Get(3)->ToInteger()->Value())
.setColumnNumber(resultTuple->Get(4)->ToInteger()->Value());
- V8StringResource<WithUndefinedOrNullCheck> errorResource(resultTuple->Get(1));
- if (!errorResource.prepare()) {
- *error = "Unknown error.";
- return false;
- }
- *error = errorResource;
+ *error = toWebCoreStringWithUndefinedOrNullCheck(resultTuple->Get(1));
errorData = TypeBuilder::Debugger::SetScriptSourceError::create();
errorData->setCompileError(compileError);
return false;
@@ -394,10 +384,8 @@
Vector<String> breakpointIds;
if (!hitBreakpointNumbers.IsEmpty()) {
breakpointIds.resize(hitBreakpointNumbers->Length());
- for (size_t i = 0; i < hitBreakpointNumbers->Length(); i++) {
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, hitBreakpointNumber, hitBreakpointNumbers->Get(i));
- breakpointIds[i] = hitBreakpointNumber;
- }
+ for (size_t i = 0; i < hitBreakpointNumbers->Length(); i++)
+ breakpointIds[i] = toWebCoreStringWithUndefinedOrNullCheck(hitBreakpointNumbers->Get(i));
}
m_executionState.set(m_isolate, executionState);
@@ -501,15 +489,12 @@
void ScriptDebugServer::dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Object> object)
{
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, sourceID, object->Get(v8AtomicString(m_isolate, "id")));
+ String sourceID = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8AtomicString(m_isolate, "id")));
ScriptDebugListener::Script script;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, url, object->Get(v8AtomicString(m_isolate, "name")));
- script.url = url;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, source, object->Get(v8AtomicString(m_isolate, "source")));
- script.source = source;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, sourceMappingURL, object->Get(v8AtomicString(m_isolate, "sourceMappingURL")));
- script.sourceMappingURL = sourceMappingURL;
+ script.url = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8AtomicString(m_isolate, "name")));
+ script.source = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8AtomicString(m_isolate, "source")));
+ script.sourceMappingURL = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8AtomicString(m_isolate, "sourceMappingURL")));
script.startLine = object->Get(v8AtomicString(m_isolate, "startLine"))->ToInteger()->Value();
script.startColumn = object->Get(v8AtomicString(m_isolate, "startColumn"))->ToInteger()->Value();
script.endLine = object->Get(v8AtomicString(m_isolate, "endLine"))->ToInteger()->Value();
« no previous file with comments | « Source/bindings/v8/PageScriptDebugServer.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698