| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "wtf/PassOwnPtr.h" | 41 #include "wtf/PassOwnPtr.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 #define CALLBACK_LIST(V) \ | 45 #define CALLBACK_LIST(V) \ |
| 46 V(created, CreatedCallback) \ | 46 V(created, CreatedCallback) \ |
| 47 V(attached, AttachedCallback) \ | 47 V(attached, AttachedCallback) \ |
| 48 V(detached, DetachedCallback) \ | 48 V(detached, DetachedCallback) \ |
| 49 V(attributeChanged, AttributeChangedCallback) | 49 V(attributeChanged, AttributeChangedCallback) |
| 50 | 50 |
| 51 RawPtr<V8CustomElementLifecycleCallbacks> V8CustomElementLifecycleCallbacks::cre
ate(ScriptState* scriptState, v8::Local<v8::Object> prototype, v8::MaybeLocal<v8
::Function> created, v8::MaybeLocal<v8::Function> attached, v8::MaybeLocal<v8::F
unction> detached, v8::MaybeLocal<v8::Function> attributeChanged) | 51 V8CustomElementLifecycleCallbacks* V8CustomElementLifecycleCallbacks::create(Scr
iptState* scriptState, v8::Local<v8::Object> prototype, v8::MaybeLocal<v8::Funct
ion> created, v8::MaybeLocal<v8::Function> attached, v8::MaybeLocal<v8::Function
> detached, v8::MaybeLocal<v8::Function> attributeChanged) |
| 52 { | 52 { |
| 53 v8::Isolate* isolate = scriptState->isolate(); | 53 v8::Isolate* isolate = scriptState->isolate(); |
| 54 // A given object can only be used as a Custom Element prototype | 54 // A given object can only be used as a Custom Element prototype |
| 55 // once; see customElementIsInterfacePrototypeObject | 55 // once; see customElementIsInterfacePrototypeObject |
| 56 #define SET_HIDDEN_VALUE(Value, Name) \ | 56 #define SET_HIDDEN_VALUE(Value, Name) \ |
| 57 ASSERT(V8HiddenValue::getHiddenValue(scriptState, prototype, V8HiddenValue::
customElement##Name(isolate)).IsEmpty()); \ | 57 ASSERT(V8HiddenValue::getHiddenValue(scriptState, prototype, V8HiddenValue::
customElement##Name(isolate)).IsEmpty()); \ |
| 58 if (!Value.IsEmpty()) \ | 58 if (!Value.IsEmpty()) \ |
| 59 V8HiddenValue::setHiddenValue(scriptState, prototype, V8HiddenValue::cus
tomElement##Name(isolate), Value.ToLocalChecked()); | 59 V8HiddenValue::setHiddenValue(scriptState, prototype, V8HiddenValue::cus
tomElement##Name(isolate), Value.ToLocalChecked()); |
| 60 | 60 |
| 61 CALLBACK_LIST(SET_HIDDEN_VALUE) | 61 CALLBACK_LIST(SET_HIDDEN_VALUE) |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 ScriptController::callFunction(getExecutionContext(), callback, receiver, 0,
0, isolate); | 241 ScriptController::callFunction(getExecutionContext(), callback, receiver, 0,
0, isolate); |
| 242 } | 242 } |
| 243 | 243 |
| 244 DEFINE_TRACE(V8CustomElementLifecycleCallbacks) | 244 DEFINE_TRACE(V8CustomElementLifecycleCallbacks) |
| 245 { | 245 { |
| 246 CustomElementLifecycleCallbacks::trace(visitor); | 246 CustomElementLifecycleCallbacks::trace(visitor); |
| 247 ContextLifecycleObserver::trace(visitor); | 247 ContextLifecycleObserver::trace(visitor); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace blink | 250 } // namespace blink |
| OLD | NEW |