| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/csspaint/PaintWorkletGlobalScope.h" | 5 #include "modules/csspaint/PaintWorkletGlobalScope.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8BindingMacros.h" | 7 #include "bindings/core/v8/V8BindingMacros.h" |
| 8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" | 8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
| 9 #include "core/CSSPropertyNames.h" | 9 #include "core/CSSPropertyNames.h" |
| 10 #include "core/css/CSSSyntaxDescriptor.h" | 10 #include "core/css/CSSSyntaxDescriptor.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 if (exceptionState.hadException()) | 120 if (exceptionState.hadException()) |
| 121 return; | 121 return; |
| 122 | 122 |
| 123 for (const auto& type : argumentTypes) { | 123 for (const auto& type : argumentTypes) { |
| 124 CSSSyntaxDescriptor syntaxDescriptor(type); | 124 CSSSyntaxDescriptor syntaxDescriptor(type); |
| 125 if (!syntaxDescriptor.isValid()) { | 125 if (!syntaxDescriptor.isValid()) { |
| 126 exceptionState.throwTypeError("Invalid argument types."); | 126 exceptionState.throwTypeError("Invalid argument types."); |
| 127 return; | 127 return; |
| 128 } | 128 } |
| 129 inputArgumentTypes.append(syntaxDescriptor); | 129 inputArgumentTypes.push_back(syntaxDescriptor); |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 | 133 |
| 134 // Parse 'alpha' AKA hasAlpha property. | 134 // Parse 'alpha' AKA hasAlpha property. |
| 135 v8::Local<v8::Value> alphaValue; | 135 v8::Local<v8::Value> alphaValue; |
| 136 if (!v8Call(constructor->Get(context, v8String(isolate, "alpha")), | 136 if (!v8Call(constructor->Get(context, v8String(isolate, "alpha")), |
| 137 alphaValue)) | 137 alphaValue)) |
| 138 return; | 138 return; |
| 139 if (!isUndefinedOrNull(alphaValue) && !alphaValue->IsBoolean()) { | 139 if (!isUndefinedOrNull(alphaValue) && !alphaValue->IsBoolean()) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 set->add(generator); | 215 set->add(generator); |
| 216 } | 216 } |
| 217 | 217 |
| 218 DEFINE_TRACE(PaintWorkletGlobalScope) { | 218 DEFINE_TRACE(PaintWorkletGlobalScope) { |
| 219 visitor->trace(m_paintDefinitions); | 219 visitor->trace(m_paintDefinitions); |
| 220 visitor->trace(m_pendingGenerators); | 220 visitor->trace(m_pendingGenerators); |
| 221 MainThreadWorkletGlobalScope::trace(visitor); | 221 MainThreadWorkletGlobalScope::trace(visitor); |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace blink | 224 } // namespace blink |
| OLD | NEW |