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

Side by Side Diff: third_party/WebKit/Source/core/dom/CompositorProxy.cpp

Issue 2272613003: binding: Retires ExceptionState::throwIfNeeded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/CompositorProxy.h" 5 #include "core/dom/CompositorProxy.h"
6 6
7 #include "bindings/core/v8/ExceptionMessages.h" 7 #include "bindings/core/v8/ExceptionMessages.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "core/dom/DOMNodeIds.h" 9 #include "core/dom/DOMNodeIds.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 sanityCheckProperties &= ~static_cast<uint32_t>(allowedProperties[i].pro perty); 100 sanityCheckProperties &= ~static_cast<uint32_t>(allowedProperties[i].pro perty);
101 } 101 }
102 return !sanityCheckProperties; 102 return !sanityCheckProperties;
103 } 103 }
104 #endif 104 #endif
105 105
106 CompositorProxy* CompositorProxy::create(ExecutionContext* context, Element* ele ment, const Vector<String>& attributeArray, ExceptionState& exceptionState) 106 CompositorProxy* CompositorProxy::create(ExecutionContext* context, Element* ele ment, const Vector<String>& attributeArray, ExceptionState& exceptionState)
107 { 107 {
108 if (!context->isDocument()) { 108 if (!context->isDocument()) {
109 exceptionState.throwTypeError(ExceptionMessages::failedToConstruct("Comp ositorProxy", "Can only be created from the main context.")); 109 exceptionState.throwTypeError(ExceptionMessages::failedToConstruct("Comp ositorProxy", "Can only be created from the main context."));
110 exceptionState.throwIfNeeded();
111 return nullptr; 110 return nullptr;
112 } 111 }
113 112
114 return new CompositorProxy(*element, attributeArray); 113 return new CompositorProxy(*element, attributeArray);
115 } 114 }
116 115
117 CompositorProxy* CompositorProxy::create(ExecutionContext* context, uint64_t ele mentId, uint32_t compositorMutableProperties) 116 CompositorProxy* CompositorProxy::create(ExecutionContext* context, uint64_t ele mentId, uint32_t compositorMutableProperties)
118 { 117 {
119 if (context->isCompositorWorkerGlobalScope()) { 118 if (context->isCompositorWorkerGlobalScope()) {
120 WorkerClients* clients = toWorkerGlobalScope(context)->clients(); 119 WorkerClients* clients = toWorkerGlobalScope(context)->clients();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 return; 273 return;
275 m_connected = false; 274 m_connected = false;
276 if (isMainThread()) { 275 if (isMainThread()) {
277 decrementCompositorProxiedPropertiesForElement(m_elementId, m_compositor MutableProperties); 276 decrementCompositorProxiedPropertiesForElement(m_elementId, m_compositor MutableProperties);
278 } else { 277 } else {
279 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FR OM_HERE, crossThreadBind(&decrementCompositorProxiedPropertiesForElement, m_elem entId, m_compositorMutableProperties)); 278 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FR OM_HERE, crossThreadBind(&decrementCompositorProxiedPropertiesForElement, m_elem entId, m_compositorMutableProperties));
280 } 279 }
281 } 280 }
282 281
283 } // namespace blink 282 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698