| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool ContainsWrapper() const { return !main_world_wrapper_.IsEmpty(); } | 150 bool ContainsWrapper() const { return !main_world_wrapper_.IsEmpty(); } |
| 151 | 151 |
| 152 // Mark wrapper of this ScriptWrappable as alive in V8. Only marks | 152 // Mark wrapper of this ScriptWrappable as alive in V8. Only marks |
| 153 // wrapper in the main world. To mark wrappers in all worlds call | 153 // wrapper in the main world. To mark wrappers in all worlds call |
| 154 // ScriptWrappableVisitor::markWrapper(ScriptWrappable*, v8::Isolate*) | 154 // ScriptWrappableVisitor::markWrapper(ScriptWrappable*, v8::Isolate*) |
| 155 void MarkWrapper(const WrapperVisitor*) const; | 155 void MarkWrapper(const WrapperVisitor*) const; |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 // These classes are exceptionally allowed to use mainWorldWrapper(). | 158 // These classes are exceptionally allowed to use MainWorldWrapper(). |
| 159 friend class DOMDataStore; | 159 friend class DOMDataStore; |
| 160 friend class HeapSnaphotWrapperVisitor; | 160 friend class HeapSnaphotWrapperVisitor; |
| 161 friend class V8HiddenValue; | 161 friend class V8HiddenValue; |
| 162 friend class V8PrivateProperty; | 162 friend class V8PrivateProperty; |
| 163 | 163 |
| 164 v8::Local<v8::Object> MainWorldWrapper(v8::Isolate* isolate) const { | 164 v8::Local<v8::Object> MainWorldWrapper(v8::Isolate* isolate) const { |
| 165 return v8::Local<v8::Object>::New(isolate, main_world_wrapper_); | 165 return v8::Local<v8::Object>::New(isolate, main_world_wrapper_); |
| 166 } | 166 } |
| 167 | 167 |
| 168 // Only use when really necessary, i.e., when passing over this | 168 // Only use when really necessary, i.e., when passing over this |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 #define DECLARE_WRAPPERTYPEINFO() \ | 204 #define DECLARE_WRAPPERTYPEINFO() \ |
| 205 public: \ | 205 public: \ |
| 206 const WrapperTypeInfo* GetWrapperTypeInfo() const override; \ | 206 const WrapperTypeInfo* GetWrapperTypeInfo() const override; \ |
| 207 \ | 207 \ |
| 208 private: \ | 208 private: \ |
| 209 typedef void end_of_define_wrappertypeinfo_not_reached_t | 209 typedef void end_of_define_wrappertypeinfo_not_reached_t |
| 210 | 210 |
| 211 } // namespace blink | 211 } // namespace blink |
| 212 | 212 |
| 213 #endif // ScriptWrappable_h | 213 #endif // ScriptWrappable_h |
| OLD | NEW |