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

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

Issue 404513002: Propagate nested importScripts() error events outwards. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use STACK_ALLOCATED() Created 6 years, 5 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
« no previous file with comments | « Source/bindings/core/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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (scriptLoader->failed()) { 257 if (scriptLoader->failed()) {
258 exceptionState.throwDOMException(NetworkError, "The script at '" + i t->elidedString() + "' failed to load."); 258 exceptionState.throwDOMException(NetworkError, "The script at '" + i t->elidedString() + "' failed to load.");
259 return; 259 return;
260 } 260 }
261 261
262 InspectorInstrumentation::scriptImported(&executionContext, scriptLoader ->identifier(), scriptLoader->script()); 262 InspectorInstrumentation::scriptImported(&executionContext, scriptLoader ->identifier(), scriptLoader->script());
263 263
264 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = nullptr; 264 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = nullptr;
265 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader ->responseURL()), &errorEvent); 265 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader ->responseURL()), &errorEvent);
266 if (errorEvent) { 266 if (errorEvent) {
267 m_script->rethrowExceptionFromImportedScript(errorEvent.release()); 267 m_script->rethrowExceptionFromImportedScript(errorEvent.release(), e xceptionState);
268 return; 268 return;
269 } 269 }
270 } 270 }
271 } 271 }
272 272
273 EventTarget* WorkerGlobalScope::errorEventTarget() 273 EventTarget* WorkerGlobalScope::errorEventTarget()
274 { 274 {
275 return this; 275 return this;
276 } 276 }
277 277
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 visitor->trace(m_location); 340 visitor->trace(m_location);
341 visitor->trace(m_navigator); 341 visitor->trace(m_navigator);
342 visitor->trace(m_eventQueue); 342 visitor->trace(m_eventQueue);
343 visitor->trace(m_workerClients); 343 visitor->trace(m_workerClients);
344 WillBeHeapSupplementable<WorkerGlobalScope>::trace(visitor); 344 WillBeHeapSupplementable<WorkerGlobalScope>::trace(visitor);
345 ExecutionContext::trace(visitor); 345 ExecutionContext::trace(visitor);
346 EventTargetWithInlineData::trace(visitor); 346 EventTargetWithInlineData::trace(visitor);
347 } 347 }
348 348
349 } // namespace WebCore 349 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/WorkerScriptController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698