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

Side by Side Diff: Source/bindings/v8/ScriptCallStackFactory.cpp

Issue 113213002: Rename toWebCoreString*() utility methods to toCoreString*() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Keep "to" prefix 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 unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/PageScriptDebugServer.cpp ('k') | Source/bindings/v8/ScriptDebugServer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class ExecutionContext; 49 class ExecutionContext;
50 50
51 static ScriptCallFrame toScriptCallFrame(v8::Handle<v8::StackFrame> frame) 51 static ScriptCallFrame toScriptCallFrame(v8::Handle<v8::StackFrame> frame)
52 { 52 {
53 StringBuilder stringBuilder; 53 StringBuilder stringBuilder;
54 stringBuilder.appendNumber(frame->GetScriptId()); 54 stringBuilder.appendNumber(frame->GetScriptId());
55 String scriptId = stringBuilder.toString(); 55 String scriptId = stringBuilder.toString();
56 String sourceName; 56 String sourceName;
57 v8::Local<v8::String> sourceNameValue(frame->GetScriptNameOrSourceURL()); 57 v8::Local<v8::String> sourceNameValue(frame->GetScriptNameOrSourceURL());
58 if (!sourceNameValue.IsEmpty()) 58 if (!sourceNameValue.IsEmpty())
59 sourceName = toWebCoreString(sourceNameValue); 59 sourceName = toCoreString(sourceNameValue);
60 60
61 String functionName; 61 String functionName;
62 v8::Local<v8::String> functionNameValue(frame->GetFunctionName()); 62 v8::Local<v8::String> functionNameValue(frame->GetFunctionName());
63 if (!functionNameValue.IsEmpty()) 63 if (!functionNameValue.IsEmpty())
64 functionName = toWebCoreString(functionNameValue); 64 functionName = toCoreString(functionNameValue);
65 65
66 int sourceLineNumber = frame->GetLineNumber(); 66 int sourceLineNumber = frame->GetLineNumber();
67 int sourceColumn = frame->GetColumn(); 67 int sourceColumn = frame->GetColumn();
68 return ScriptCallFrame(functionName, scriptId, sourceName, sourceLineNumber, sourceColumn); 68 return ScriptCallFrame(functionName, scriptId, sourceName, sourceLineNumber, sourceColumn);
69 } 69 }
70 70
71 static void toScriptCallFramesVector(v8::Handle<v8::StackTrace> stackTrace, Vect or<ScriptCallFrame>& scriptCallFrames, size_t maxStackSize, bool emptyStackIsAll owed, v8::Isolate* isolate) 71 static void toScriptCallFramesVector(v8::Handle<v8::StackTrace> stackTrace, Vect or<ScriptCallFrame>& scriptCallFrames, size_t maxStackSize, bool emptyStackIsAll owed, v8::Isolate* isolate)
72 { 72 {
73 ASSERT(isolate->InContext()); 73 ASSERT(isolate->InContext());
74 int frameCount = stackTrace->GetFrameCount(); 74 int frameCount = stackTrace->GetFrameCount();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ScriptState* state = ScriptState::forContext(context); 129 ScriptState* state = ScriptState::forContext(context);
130 130
131 Vector<ScriptValue> arguments; 131 Vector<ScriptValue> arguments;
132 for (int i = skipArgumentCount; i < v8arguments.Length(); ++i) 132 for (int i = skipArgumentCount; i < v8arguments.Length(); ++i)
133 arguments.append(ScriptValue(v8arguments[i], isolate)); 133 arguments.append(ScriptValue(v8arguments[i], isolate));
134 134
135 return ScriptArguments::create(state, arguments); 135 return ScriptArguments::create(state, arguments);
136 } 136 }
137 137
138 } // namespace WebCore 138 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/PageScriptDebugServer.cpp ('k') | Source/bindings/v8/ScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698