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

Side by Side Diff: Source/core/workers/WorkerGlobalScope.cpp

Issue 22467005: Correctly attribute exceptions thrown inside a Worker's imported scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Killing windows-specific expectations. Created 7 years, 4 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
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | no next file » | 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros sOriginRequests); 207 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros sOriginRequests);
208 208
209 // If the fetching attempt failed, throw a NetworkError exception and ab ort all these steps. 209 // If the fetching attempt failed, throw a NetworkError exception and ab ort all these steps.
210 if (scriptLoader->failed()) { 210 if (scriptLoader->failed()) {
211 es.throwDOMException(NetworkError); 211 es.throwDOMException(NetworkError);
212 return; 212 return;
213 } 213 }
214 214
215 InspectorInstrumentation::scriptImported(scriptExecutionContext(), scrip tLoader->identifier(), scriptLoader->script()); 215 InspectorInstrumentation::scriptImported(scriptExecutionContext(), scrip tLoader->identifier(), scriptLoader->script());
216 216
217 ScriptValue exception; 217 RefPtr<ErrorEvent> errorEvent;
218 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader ->responseURL()), &exception); 218 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader ->responseURL()), &errorEvent);
219 if (!exception.hasNoValue()) { 219 if (errorEvent) {
220 m_script->setException(exception); 220 m_script->rethrowExceptionFromImportedScript(errorEvent.release());
221 return; 221 return;
222 } 222 }
223 } 223 }
224 } 224 }
225 225
226 EventTarget* WorkerGlobalScope::errorEventTarget() 226 EventTarget* WorkerGlobalScope::errorEventTarget()
227 { 227 {
228 return this; 228 return this;
229 } 229 }
230 230
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 { 334 {
335 return script()->idleNotification(); 335 return script()->idleNotification();
336 } 336 }
337 337
338 WorkerEventQueue* WorkerGlobalScope::eventQueue() const 338 WorkerEventQueue* WorkerGlobalScope::eventQueue() const
339 { 339 {
340 return m_eventQueue.get(); 340 return m_eventQueue.get();
341 } 341 }
342 342
343 } // namespace WebCore 343 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698