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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 } | 120 } |
121 | 121 |
122 v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate* isolate) const | 122 v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate* isolate) const |
123 { | 123 { |
124 return domTemplateFunction(isolate); | 124 return domTemplateFunction(isolate); |
125 } | 125 } |
126 | 126 |
127 void refObject(ScriptWrappable* scriptWrappable) const | 127 void refObject(ScriptWrappable* scriptWrappable) const |
128 { | 128 { |
129 if (gcType == GarbageCollectedObject) { | 129 if (gcType == GarbageCollectedObject) { |
130 ThreadState::current()->persistentAllocated(); | 130 ThreadState::current()->wrapperAllocated(); |
131 } else if (gcType == WillBeGarbageCollectedObject) { | 131 } else if (gcType == WillBeGarbageCollectedObject) { |
132 #if ENABLE(OILPAN) | 132 #if ENABLE(OILPAN) |
133 ThreadState::current()->persistentAllocated(); | 133 ThreadState::current()->wrapperAllocated(); |
134 #endif | 134 #endif |
135 } | 135 } |
136 ASSERT(refObjectFunction); | 136 ASSERT(refObjectFunction); |
137 refObjectFunction(scriptWrappable); | 137 refObjectFunction(scriptWrappable); |
138 } | 138 } |
139 | 139 |
140 void derefObject(ScriptWrappable* scriptWrappable) const | 140 void derefObject(ScriptWrappable* scriptWrappable) const |
141 { | 141 { |
142 if (gcType == GarbageCollectedObject) { | 142 if (gcType == GarbageCollectedObject) { |
143 ThreadState::current()->persistentFreed(); | 143 ThreadState::current()->wrapperFreed(); |
144 } else if (gcType == WillBeGarbageCollectedObject) { | 144 } else if (gcType == WillBeGarbageCollectedObject) { |
145 #if ENABLE(OILPAN) | 145 #if ENABLE(OILPAN) |
146 ThreadState::current()->persistentFreed(); | 146 ThreadState::current()->wrapperFreed(); |
147 #endif | 147 #endif |
148 } | 148 } |
149 ASSERT(derefObjectFunction); | 149 ASSERT(derefObjectFunction); |
150 derefObjectFunction(scriptWrappable); | 150 derefObjectFunction(scriptWrappable); |
151 } | 151 } |
152 | 152 |
153 void trace(Visitor* visitor, ScriptWrappable* scriptWrappable) const | 153 void trace(Visitor* visitor, ScriptWrappable* scriptWrappable) const |
154 { | 154 { |
155 ASSERT(traceFunction); | 155 ASSERT(traceFunction); |
156 return traceFunction(visitor, scriptWrappable); | 156 return traceFunction(visitor, scriptWrappable); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 257 } |
258 | 258 |
259 inline void releaseObject(v8::Global<v8::Object>& wrapper) | 259 inline void releaseObject(v8::Global<v8::Object>& wrapper) |
260 { | 260 { |
261 toWrapperTypeInfo(wrapper)->derefObject(toScriptWrappable(wrapper)); | 261 toWrapperTypeInfo(wrapper)->derefObject(toScriptWrappable(wrapper)); |
262 } | 262 } |
263 | 263 |
264 } // namespace blink | 264 } // namespace blink |
265 | 265 |
266 #endif // WrapperTypeInfo_h | 266 #endif // WrapperTypeInfo_h |
OLD | NEW |