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

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

Issue 100963003: Use V8TRYCATCH_FOR_V8STRINGRESOURCE() macro instead of toCoreStringWithUndefinedOrNullCheck() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take Yury's feedback into consideration 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
Index: Source/bindings/v8/ScriptDebugServer.cpp
diff --git a/Source/bindings/v8/ScriptDebugServer.cpp b/Source/bindings/v8/ScriptDebugServer.cpp
index ee11d9ef1322dc98d3d4ed43b2825d55dfe3c9df..4195a44baa27504cb5f0dcd3a3bc7ab1cda9da54 100644
--- a/Source/bindings/v8/ScriptDebugServer.cpp
+++ b/Source/bindings/v8/ScriptDebugServer.cpp
@@ -383,8 +383,11 @@ void ScriptDebugServer::handleProgramBreak(v8::Handle<v8::Object> executionState
Vector<String> breakpointIds;
if (!hitBreakpointNumbers.IsEmpty()) {
breakpointIds.resize(hitBreakpointNumbers->Length());
- for (size_t i = 0; i < hitBreakpointNumbers->Length(); i++)
- breakpointIds[i] = toCoreStringWithUndefinedOrNullCheck(hitBreakpointNumbers->Get(i));
+ for (size_t i = 0; i < hitBreakpointNumbers->Length(); i++) {
+ v8::Handle<v8::Value> hitBreakpointNumber = hitBreakpointNumbers->Get(i);
+ ASSERT(!hitBreakpointNumber.IsEmpty() && hitBreakpointNumber->IsInt32());
+ breakpointIds[i] = String::number(hitBreakpointNumber->Int32Value());
+ }
}
m_executionState.set(m_isolate, executionState);
@@ -488,7 +491,9 @@ void ScriptDebugServer::handleV8DebugEvent(const v8::Debug::EventDetails& eventD
void ScriptDebugServer::dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Object> object)
{
- String sourceID = toCoreStringWithUndefinedOrNullCheck(object->Get(v8AtomicString(m_isolate, "id")));
+ v8::Handle<v8::Value> id = object->Get(v8AtomicString(m_isolate, "id"));
+ ASSERT(!id.IsEmpty() && id->IsInt32());
+ String sourceID = String::number(id->Int32Value());
ScriptDebugListener::Script script;
script.url = toCoreStringWithUndefinedOrNullCheck(object->Get(v8AtomicString(m_isolate, "name")));
« no previous file with comments | « LayoutTests/fast/dom/Window/showModalDialog-invalid-arguments-expected.txt ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698