| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 Node* node = static_cast<Node*>(object); | 277 Node* node = static_cast<Node*>(object); |
| 278 | 278 |
| 279 if (node->hasEventListeners()) | 279 if (node->hasEventListeners()) |
| 280 addReferencesForNodeWithEventListeners(m_isolate, node, v8::Pers
istent<v8::Object>::Cast(*value)); | 280 addReferencesForNodeWithEventListeners(m_isolate, node, v8::Pers
istent<v8::Object>::Cast(*value)); |
| 281 Node* root = V8GCController::opaqueRootForGC(node, m_isolate); | 281 Node* root = V8GCController::opaqueRootForGC(node, m_isolate); |
| 282 m_isolate->SetObjectGroupId(*value, v8::UniqueId(reinterpret_cast<in
tptr_t>(root))); | 282 m_isolate->SetObjectGroupId(*value, v8::UniqueId(reinterpret_cast<in
tptr_t>(root))); |
| 283 if (m_constructRetainedObjectInfos) | 283 if (m_constructRetainedObjectInfos) |
| 284 m_groupsWhichNeedRetainerInfo.append(root); | 284 m_groupsWhichNeedRetainerInfo.append(root); |
| 285 } else if (classId == v8DOMObjectClassId) { | 285 } else if (classId == v8DOMObjectClassId) { |
| 286 ASSERT(!value->IsIndependent()); | 286 ASSERT(!value->IsIndependent()); |
| 287 void* root = type->opaqueRootForGC(object, m_isolate); | 287 v8::Persistent<v8::Object>* wrapperPersistent = reinterpret_cast<v8:
:Persistent<v8::Object>*>(value); |
| 288 m_isolate->SetObjectGroupId(*value, v8::UniqueId(reinterpret_cast<in
tptr_t>(root))); | 288 type->resolveWrapperReachability(object, *wrapperPersistent, m_isola
te); |
| 289 } else { | 289 } else { |
| 290 ASSERT_NOT_REACHED(); | 290 ASSERT_NOT_REACHED(); |
| 291 } | 291 } |
| 292 } | 292 } |
| 293 | 293 |
| 294 void notifyFinished() | 294 void notifyFinished() |
| 295 { | 295 { |
| 296 if (!m_constructRetainedObjectInfos) | 296 if (!m_constructRetainedObjectInfos) |
| 297 return; | 297 return; |
| 298 std::sort(m_groupsWhichNeedRetainerInfo.begin(), m_groupsWhichNeedRetain
erInfo.end()); | 298 std::sort(m_groupsWhichNeedRetainerInfo.begin(), m_groupsWhichNeedRetain
erInfo.end()); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 { | 414 { |
| 415 v8::HandleScope handleScope(isolate); | 415 v8::HandleScope handleScope(isolate); |
| 416 v8::Local<v8::Context> context = v8::Context::New(isolate); | 416 v8::Local<v8::Context> context = v8::Context::New(isolate); |
| 417 if (context.IsEmpty()) | 417 if (context.IsEmpty()) |
| 418 return; | 418 return; |
| 419 v8::Context::Scope contextScope(context); | 419 v8::Context::Scope contextScope(context); |
| 420 V8ScriptRunner::compileAndRunInternalScript(v8String("if (gc) gc();", isolat
e), isolate); | 420 V8ScriptRunner::compileAndRunInternalScript(v8String("if (gc) gc();", isolat
e), isolate); |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace WebCore | 423 } // namespace WebCore |
| OLD | NEW |