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

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

Issue 23470004: Have handleMaxRecursionDepthExceeded() take an isolate in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months 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 | Annotate | Revision Log
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_disableE valPending, m_isolate)); 147 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_disableE valPending, m_isolate));
148 m_disableEvalPending = String(); 148 m_disableEvalPending = String();
149 } 149 }
150 150
151 v8::Context::Scope scope(context); 151 v8::Context::Scope scope(context);
152 152
153 v8::TryCatch block; 153 v8::TryCatch block;
154 154
155 v8::Handle<v8::String> scriptString = v8String(script, m_isolate); 155 v8::Handle<v8::String> scriptString = v8String(script, m_isolate);
156 v8::Handle<v8::Script> compiledScript = V8ScriptRunner::compileScript(script String, fileName, scriptStartPosition, 0, m_isolate); 156 v8::Handle<v8::Script> compiledScript = V8ScriptRunner::compileScript(script String, fileName, scriptStartPosition, 0, m_isolate);
157 v8::Local<v8::Value> result = V8ScriptRunner::runCompiledScript(compiledScri pt, m_workerGlobalScope); 157 v8::Local<v8::Value> result = V8ScriptRunner::runCompiledScript(compiledScri pt, m_workerGlobalScope, m_isolate);
158 158
159 if (!block.CanContinue()) { 159 if (!block.CanContinue()) {
160 m_workerGlobalScope->script()->forbidExecution(); 160 m_workerGlobalScope->script()->forbidExecution();
161 return ScriptValue(); 161 return ScriptValue();
162 } 162 }
163 163
164 if (block.HasCaught()) { 164 if (block.HasCaught()) {
165 v8::Local<v8::Message> message = block.Message(); 165 v8::Local<v8::Message> message = block.Message();
166 state->hadException = true; 166 state->hadException = true;
167 state->errorMessage = toWebCoreString(message->Get()); 167 state->errorMessage = toWebCoreString(message->Get());
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 v8::Handle<v8::Object> global = context->Global(); 250 v8::Handle<v8::Object> global = context->Global();
251 global = global->FindInstanceInPrototypeChain(V8WorkerGlobalScope::GetTempla te(context->GetIsolate(), WorkerWorld)); 251 global = global->FindInstanceInPrototypeChain(V8WorkerGlobalScope::GetTempla te(context->GetIsolate(), WorkerWorld));
252 // Return 0 if the current executing context is not the worker context. 252 // Return 0 if the current executing context is not the worker context.
253 if (global.IsEmpty()) 253 if (global.IsEmpty())
254 return 0; 254 return 0;
255 WorkerGlobalScope* workerGlobalScope = V8WorkerGlobalScope::toNative(global) ; 255 WorkerGlobalScope* workerGlobalScope = V8WorkerGlobalScope::toNative(global) ;
256 return workerGlobalScope->script(); 256 return workerGlobalScope->script();
257 } 257 }
258 258
259 } // namespace WebCore 259 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698