| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 <v8.h> | 41 #include <v8.h> |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 class Node; | 45 class Node; |
| 46 struct WrapperTypeInfo; | 46 struct WrapperTypeInfo; |
| 47 | 47 |
| 48 class V8DOMWrapper { | 48 class V8DOMWrapper { |
| 49 STATIC_ONLY(V8DOMWrapper); | 49 STATIC_ONLY(V8DOMWrapper); |
| 50 public: | 50 public: |
| 51 static v8::Local<v8::Object> createWrapper(v8::Isolate*, v8::Local<v8::Objec
t> creationContext, const WrapperTypeInfo*, ScriptWrappable*); | 51 static v8::Local<v8::Object> createWrapper(v8::Isolate*, v8::Local<v8::Objec
t> creationContext, const WrapperTypeInfo*); |
| 52 static bool isWrapper(v8::Isolate*, v8::Local<v8::Value>); | 52 static bool isWrapper(v8::Isolate*, v8::Local<v8::Value>); |
| 53 | 53 |
| 54 // Associates the given ScriptWrappable with the given |wrapper| if the | 54 // Associates the given ScriptWrappable with the given |wrapper| if the |
| 55 // ScriptWrappable is not yet associated with any wrapper. Returns the | 55 // ScriptWrappable is not yet associated with any wrapper. Returns the |
| 56 // wrapper already associated or |wrapper| if not yet associated. | 56 // wrapper already associated or |wrapper| if not yet associated. |
| 57 // The caller should always use the returned value rather than |wrapper|. | 57 // The caller should always use the returned value rather than |wrapper|. |
| 58 static v8::Local<v8::Object> associateObjectWithWrapper(v8::Isolate*, Script
Wrappable*, const WrapperTypeInfo*, v8::Local<v8::Object> wrapper) WARN_UNUSED_R
ETURN; | 58 static v8::Local<v8::Object> associateObjectWithWrapper(v8::Isolate*, Script
Wrappable*, const WrapperTypeInfo*, v8::Local<v8::Object> wrapper) WARN_UNUSED_R
ETURN; |
| 59 static v8::Local<v8::Object> associateObjectWithWrapper(v8::Isolate*, Node*,
const WrapperTypeInfo*, v8::Local<v8::Object> wrapper) WARN_UNUSED_RETURN; | 59 static v8::Local<v8::Object> associateObjectWithWrapper(v8::Isolate*, Node*,
const WrapperTypeInfo*, v8::Local<v8::Object> wrapper) WARN_UNUSED_RETURN; |
| 60 static void setNativeInfo(v8::Local<v8::Object>, const WrapperTypeInfo*, Scr
iptWrappable*); | 60 static void setNativeInfo(v8::Local<v8::Object>, const WrapperTypeInfo*, Scr
iptWrappable*); |
| 61 // hasInternalFieldsSet only checks if the value has the internal fields for | 61 // hasInternalFieldsSet only checks if the value has the internal fields for |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 bool m_didEnterContext; | 151 bool m_didEnterContext; |
| 152 v8::Local<v8::Context> m_context; | 152 v8::Local<v8::Context> m_context; |
| 153 v8::TryCatch m_tryCatch; | 153 v8::TryCatch m_tryCatch; |
| 154 bool m_convertExceptions; | 154 bool m_convertExceptions; |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 } // namespace blink | 157 } // namespace blink |
| 158 | 158 |
| 159 #endif // V8DOMWrapper_h | 159 #endif // V8DOMWrapper_h |
| OLD | NEW |