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

Side by Side Diff: Source/core/events/EventTarget.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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/editing/markup.cpp ('k') | Source/core/fileapi/FileReader.cpp » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 { 151 {
152 EventListener* listener = getAttributeEventListener(eventType, isolatedWorld ); 152 EventListener* listener = getAttributeEventListener(eventType, isolatedWorld );
153 if (!listener) 153 if (!listener)
154 return false; 154 return false;
155 return removeEventListener(eventType, listener, false); 155 return removeEventListener(eventType, listener, false);
156 } 156 }
157 157
158 bool EventTarget::dispatchEvent(PassRefPtr<Event> event, ExceptionState& es) 158 bool EventTarget::dispatchEvent(PassRefPtr<Event> event, ExceptionState& es)
159 { 159 {
160 if (!event || event->type().isEmpty() || event->isBeingDispatched()) { 160 if (!event || event->type().isEmpty() || event->isBeingDispatched()) {
161 es.throwDOMException(InvalidStateError); 161 es.throwUninformativeAndGenericDOMException(InvalidStateError);
162 return false; 162 return false;
163 } 163 }
164 164
165 if (!scriptExecutionContext()) 165 if (!scriptExecutionContext())
166 return false; 166 return false;
167 167
168 return dispatchEvent(event); 168 return dispatchEvent(event);
169 } 169 }
170 170
171 bool EventTarget::dispatchEvent(PassRefPtr<Event> event) 171 bool EventTarget::dispatchEvent(PassRefPtr<Event> event)
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 // they have one less listener to invoke. 357 // they have one less listener to invoke.
358 if (d->firingEventIterators) { 358 if (d->firingEventIterators) {
359 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 359 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
360 d->firingEventIterators->at(i).iterator = 0; 360 d->firingEventIterators->at(i).iterator = 0;
361 d->firingEventIterators->at(i).end = 0; 361 d->firingEventIterators->at(i).end = 0;
362 } 362 }
363 } 363 }
364 } 364 }
365 365
366 } // namespace WebCore 366 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/fileapi/FileReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698