| 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/IDLTypes.h" | 7 #include "bindings/core/v8/IDLTypes.h" |
| 8 #include "bindings/core/v8/NativeValueTraitsImpl.h" | 8 #include "bindings/core/v8/NativeValueTraitsImpl.h" |
| 9 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" | 9 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
| 10 #include "core/CSSPropertyNames.h" | 10 #include "core/CSSPropertyNames.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 if (name.IsEmpty()) { | 72 if (name.IsEmpty()) { |
| 73 exception_state.ThrowTypeError("The empty string is not a valid name."); | 73 exception_state.ThrowTypeError("The empty string is not a valid name."); |
| 74 return; | 74 return; |
| 75 } | 75 } |
| 76 | 76 |
| 77 v8::Isolate* isolate = ScriptController()->GetScriptState()->GetIsolate(); | 77 v8::Isolate* isolate = ScriptController()->GetScriptState()->GetIsolate(); |
| 78 v8::Local<v8::Context> context = ScriptController()->GetContext(); | 78 v8::Local<v8::Context> context = ScriptController()->GetContext(); |
| 79 | 79 |
| 80 ASSERT(ctor_value.V8Value()->IsFunction()); | 80 DCHECK(ctor_value.V8Value()->IsFunction()); |
| 81 v8::Local<v8::Function> constructor = | 81 v8::Local<v8::Function> constructor = |
| 82 v8::Local<v8::Function>::Cast(ctor_value.V8Value()); | 82 v8::Local<v8::Function>::Cast(ctor_value.V8Value()); |
| 83 | 83 |
| 84 v8::Local<v8::Value> input_properties_value; | 84 v8::Local<v8::Value> input_properties_value; |
| 85 if (!constructor->Get(context, V8String(isolate, "inputProperties")) | 85 if (!constructor->Get(context, V8String(isolate, "inputProperties")) |
| 86 .ToLocal(&input_properties_value)) | 86 .ToLocal(&input_properties_value)) |
| 87 return; | 87 return; |
| 88 | 88 |
| 89 Vector<CSSPropertyID> native_invalidation_properties; | 89 Vector<CSSPropertyID> native_invalidation_properties; |
| 90 Vector<AtomicString> custom_invalidation_properties; | 90 Vector<AtomicString> custom_invalidation_properties; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 set->insert(generator); | 221 set->insert(generator); |
| 222 } | 222 } |
| 223 | 223 |
| 224 DEFINE_TRACE(PaintWorkletGlobalScope) { | 224 DEFINE_TRACE(PaintWorkletGlobalScope) { |
| 225 visitor->Trace(paint_definitions_); | 225 visitor->Trace(paint_definitions_); |
| 226 visitor->Trace(pending_generators_); | 226 visitor->Trace(pending_generators_); |
| 227 MainThreadWorkletGlobalScope::Trace(visitor); | 227 MainThreadWorkletGlobalScope::Trace(visitor); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace blink | 230 } // namespace blink |
| OLD | NEW |