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

Side by Side Diff: Source/bindings/v8/WorkerScriptController.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 v8::Local<v8::Value> result = V8ScriptRunner::runCompiledScript(compiledScri pt, &m_workerGlobalScope, isolate()); 164 v8::Local<v8::Value> result = V8ScriptRunner::runCompiledScript(compiledScri pt, &m_workerGlobalScope, isolate());
165 165
166 if (!block.CanContinue()) { 166 if (!block.CanContinue()) {
167 m_workerGlobalScope.script()->forbidExecution(); 167 m_workerGlobalScope.script()->forbidExecution();
168 return ScriptValue(); 168 return ScriptValue();
169 } 169 }
170 170
171 if (block.HasCaught()) { 171 if (block.HasCaught()) {
172 v8::Local<v8::Message> message = block.Message(); 172 v8::Local<v8::Message> message = block.Message();
173 state->hadException = true; 173 state->hadException = true;
174 state->errorMessage = toWebCoreString(message->Get()); 174 state->errorMessage = toCoreString(message->Get());
175 state->lineNumber = message->GetLineNumber(); 175 state->lineNumber = message->GetLineNumber();
176 state->columnNumber = message->GetStartColumn() + 1; 176 state->columnNumber = message->GetStartColumn() + 1;
177 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, sourceURL, me ssage->GetScriptResourceName(), ScriptValue()); 177 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, sourceURL, me ssage->GetScriptResourceName(), ScriptValue());
178 state->sourceURL = sourceURL; 178 state->sourceURL = sourceURL;
179 state->exception = ScriptValue(block.Exception(), isolate()); 179 state->exception = ScriptValue(block.Exception(), isolate());
180 block.Reset(); 180 block.Reset();
181 } else 181 } else
182 state->hadException = false; 182 state->hadException = false;
183 183
184 if (result.IsEmpty() || result->IsUndefined()) 184 if (result.IsEmpty() || result->IsUndefined())
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 v8::Handle<v8::Object> global = context->Global(); 259 v8::Handle<v8::Object> global = context->Global();
260 global = global->FindInstanceInPrototypeChain(V8WorkerGlobalScope::domTempla te(isolate, WorkerWorld)); 260 global = global->FindInstanceInPrototypeChain(V8WorkerGlobalScope::domTempla te(isolate, WorkerWorld));
261 // Return 0 if the current executing context is not the worker context. 261 // Return 0 if the current executing context is not the worker context.
262 if (global.IsEmpty()) 262 if (global.IsEmpty())
263 return 0; 263 return 0;
264 WorkerGlobalScope* workerGlobalScope = V8WorkerGlobalScope::toNative(global) ; 264 WorkerGlobalScope* workerGlobalScope = V8WorkerGlobalScope::toNative(global) ;
265 return workerGlobalScope->script(); 265 return workerGlobalScope->script();
266 } 266 }
267 267
268 } // namespace WebCore 268 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8WindowShell.cpp ('k') | Source/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698