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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 isolate->SetObjectGroupId(v8::Persistent<v8::Value>::Cast(m_wrapper), gr oupId); | 144 isolate->SetObjectGroupId(v8::Persistent<v8::Value>::Cast(m_wrapper), gr oupId); |
145 } | 145 } |
146 | 146 |
147 void setReference(const v8::Persistent<v8::Object>& parent, v8::Isolate* iso late) | 147 void setReference(const v8::Persistent<v8::Object>& parent, v8::Isolate* iso late) |
148 { | 148 { |
149 isolate->SetReference(parent, m_wrapper); | 149 isolate->SetReference(parent, m_wrapper); |
150 } | 150 } |
151 | 151 |
152 bool containsWrapper() const { return !m_wrapper.IsEmpty(); } | 152 bool containsWrapper() const { return !m_wrapper.IsEmpty(); } |
153 | 153 |
154 virtual bool hasPendingActivity() const; | |
yurys
2015/10/29 16:28:26
It looks strange that we have only this method on
| |
154 #if !ENABLE(OILPAN) | 155 #if !ENABLE(OILPAN) |
155 protected: | 156 protected: |
156 virtual ~ScriptWrappable() | 157 virtual ~ScriptWrappable() |
157 { | 158 { |
158 // We must not get deleted as long as we contain a wrapper. If this happ ens, we screwed up ref | 159 // We must not get deleted as long as we contain a wrapper. If this happ ens, we screwed up ref |
159 // counting somewhere. Crash here instead of crashing during a later gc cycle. | 160 // counting somewhere. Crash here instead of crashing during a later gc cycle. |
160 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!containsWrapper()); | 161 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!containsWrapper()); |
161 } | 162 } |
162 #endif | 163 #endif |
163 // With Oilpan we don't need a ScriptWrappable destructor. | 164 // With Oilpan we don't need a ScriptWrappable destructor. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 // in X's cpp code, and instantiate X, i.e. "template class X;". | 263 // in X's cpp code, and instantiate X, i.e. "template class X;". |
263 #define DECLARE_WRAPPERTYPEINFO() \ | 264 #define DECLARE_WRAPPERTYPEINFO() \ |
264 public: \ | 265 public: \ |
265 const WrapperTypeInfo* wrapperTypeInfo() const override; \ | 266 const WrapperTypeInfo* wrapperTypeInfo() const override; \ |
266 private: \ | 267 private: \ |
267 typedef void end_of_define_wrappertypeinfo_not_reached_t | 268 typedef void end_of_define_wrappertypeinfo_not_reached_t |
268 | 269 |
269 } // namespace blink | 270 } // namespace blink |
270 | 271 |
271 #endif // ScriptWrappable_h | 272 #endif // ScriptWrappable_h |
OLD | NEW |