diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h')
-rw-r--r-- | chromium/third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h b/chromium/third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h index 2a5e4063ae7..74507081f74 100644 --- a/chromium/third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h +++ b/chromium/third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h @@ -35,11 +35,17 @@ class CORE_EXPORT CustomWrappableAdapter : public CustomWrappable { return static_cast<T*>(LookupInternal(object, property)); } - // Attaches a given |adapter| to |object|'s |property|. + // Attaches |this| adapter to |object|'s |property|. void Attach(ScriptState*, v8::Local<v8::Object> object, - const V8PrivateProperty::Symbol& property, - CustomWrappableAdapter* adapter); + const V8PrivateProperty::Symbol& property); + + // Creates and sets up the JS wrapper object. May only be called once. Returns + // the wrapper object. + // + // This method can be used when the wrapper is needed to actually create the + // object that it should be attached to. Prefer |Attach| when possible. + v8::Local<v8::Object> CreateAndInitializeWrapper(ScriptState*); ~CustomWrappableAdapter() override = default; |