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

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

Issue 1179113007: Implement onunhandledrejection / onrejectionhandled events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 5 years, 6 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/core/frame/WindowEventHandlers.idl ('k') | Source/core/workers/WorkerGlobalScope.idl » ('j') | 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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>) ove rride final; // Executes the task on context's thread asynchronously. 91 void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>) ove rride final; // Executes the task on context's thread asynchronously.
92 92
93 // WorkerGlobalScope 93 // WorkerGlobalScope
94 WorkerGlobalScope* self() { return this; } 94 WorkerGlobalScope* self() { return this; }
95 WorkerConsole* console(); 95 WorkerConsole* console();
96 WorkerLocation* location() const; 96 WorkerLocation* location() const;
97 void close(); 97 void close();
98 98
99 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 99 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
100 DEFINE_ATTRIBUTE_EVENT_LISTENER(rejectionhandled);
101 DEFINE_ATTRIBUTE_EVENT_LISTENER(unhandledrejection);
100 102
101 // WorkerUtils 103 // WorkerUtils
102 virtual void importScripts(const Vector<String>& urls, ExceptionState&); 104 virtual void importScripts(const Vector<String>& urls, ExceptionState&);
103 // Returns null if caching is not supported. 105 // Returns null if caching is not supported.
104 virtual PassOwnPtr<CachedMetadataHandler> createWorkerScriptCachedMetadataHa ndler(const KURL& scriptURL, const Vector<char>* metaData) { return nullptr; } 106 virtual PassOwnPtr<CachedMetadataHandler> createWorkerScriptCachedMetadataHa ndler(const KURL& scriptURL, const Vector<char>* metaData) { return nullptr; }
105 107
106 WorkerNavigator* navigator() const; 108 WorkerNavigator* navigator() const;
107 109
108 // ScriptWrappable 110 // ScriptWrappable
109 v8::Local<v8::Object> wrap(v8::Isolate*, v8::Local<v8::Object> creationConte xt) override final; 111 v8::Local<v8::Object> wrap(v8::Isolate*, v8::Local<v8::Object> creationConte xt) override final;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 200
199 unsigned long m_workerExceptionUniqueIdentifier; 201 unsigned long m_workerExceptionUniqueIdentifier;
200 WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi ngMessages; 202 WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi ngMessages;
201 }; 203 };
202 204
203 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 205 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
204 206
205 } // namespace blink 207 } // namespace blink
206 208
207 #endif // WorkerGlobalScope_h 209 #endif // WorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/frame/WindowEventHandlers.idl ('k') | Source/core/workers/WorkerGlobalScope.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698