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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 m_wrapper.MarkPartiallyDependent(); | 133 m_wrapper.MarkPartiallyDependent(); |
134 isolate->SetObjectGroupId(v8::Persistent<v8::Value>::Cast(m_wrapper), gr
oupId); | 134 isolate->SetObjectGroupId(v8::Persistent<v8::Value>::Cast(m_wrapper), gr
oupId); |
135 } | 135 } |
136 | 136 |
137 void setReference(const v8::Persistent<v8::Object>& parent, v8::Isolate* iso
late) | 137 void setReference(const v8::Persistent<v8::Object>& parent, v8::Isolate* iso
late) |
138 { | 138 { |
139 isolate->SetReference(parent, m_wrapper); | 139 isolate->SetReference(parent, m_wrapper); |
140 } | 140 } |
141 | 141 |
142 bool containsWrapper() const { return !m_wrapper.IsEmpty(); } | 142 bool containsWrapper() const { return !m_wrapper.IsEmpty(); } |
143 | 143 virtual bool hasPendingActivity() const { return false; } |
144 #if !ENABLE(OILPAN) | 144 #if !ENABLE(OILPAN) |
145 protected: | 145 protected: |
146 virtual ~ScriptWrappable() | 146 virtual ~ScriptWrappable() |
147 { | 147 { |
148 // We must not get deleted as long as we contain a wrapper. If this happ
ens, we screwed up ref | 148 // We must not get deleted as long as we contain a wrapper. If this happ
ens, we screwed up ref |
149 // counting somewhere. Crash here instead of crashing during a later gc
cycle. | 149 // counting somewhere. Crash here instead of crashing during a later gc
cycle. |
150 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!containsWrapper()); | 150 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!containsWrapper()); |
151 } | 151 } |
152 #endif | 152 #endif |
153 // With Oilpan we don't need a ScriptWrappable destructor. | 153 // With Oilpan we don't need a ScriptWrappable destructor. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // in X's cpp code, and instantiate X, i.e. "template class X;". | 235 // in X's cpp code, and instantiate X, i.e. "template class X;". |
236 #define DECLARE_WRAPPERTYPEINFO() \ | 236 #define DECLARE_WRAPPERTYPEINFO() \ |
237 public: \ | 237 public: \ |
238 virtual const WrapperTypeInfo* wrapperTypeInfo() const override; \ | 238 virtual const WrapperTypeInfo* wrapperTypeInfo() const override; \ |
239 private: \ | 239 private: \ |
240 typedef void end_of_define_wrappertypeinfo_not_reached_t | 240 typedef void end_of_define_wrappertypeinfo_not_reached_t |
241 | 241 |
242 } // namespace blink | 242 } // namespace blink |
243 | 243 |
244 #endif // ScriptWrappable_h | 244 #endif // ScriptWrappable_h |
OLD | NEW |