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

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

Issue 106983007: Get rid of last uses of deprecated toWebCoreString(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 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = toWebCoreString(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 state->sourceURL = toWebCoreString(message->GetScriptResourceName()); 177 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, sourceURL, me ssage->GetScriptResourceName(), ScriptValue());
178 state->sourceURL = sourceURL;
178 state->exception = ScriptValue(block.Exception(), isolate()); 179 state->exception = ScriptValue(block.Exception(), isolate());
179 block.Reset(); 180 block.Reset();
180 } else 181 } else
181 state->hadException = false; 182 state->hadException = false;
182 183
183 if (result.IsEmpty() || result->IsUndefined()) 184 if (result.IsEmpty() || result->IsUndefined())
184 return ScriptValue(); 185 return ScriptValue();
185 186
186 return ScriptValue(result, isolate()); 187 return ScriptValue(result, isolate());
187 } 188 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 v8::Handle<v8::Object> global = context->Global(); 259 v8::Handle<v8::Object> global = context->Global();
259 global = global->FindInstanceInPrototypeChain(V8WorkerGlobalScope::domTempla te(isolate, WorkerWorld)); 260 global = global->FindInstanceInPrototypeChain(V8WorkerGlobalScope::domTempla te(isolate, WorkerWorld));
260 // 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.
261 if (global.IsEmpty()) 262 if (global.IsEmpty())
262 return 0; 263 return 0;
263 WorkerGlobalScope* workerGlobalScope = V8WorkerGlobalScope::toNative(global) ; 264 WorkerGlobalScope* workerGlobalScope = V8WorkerGlobalScope::toNative(global) ;
264 return workerGlobalScope->script(); 265 return workerGlobalScope->script();
265 } 266 }
266 267
267 } // namespace WebCore 268 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Initializer.cpp ('k') | Source/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698