diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-11-19 10:49:09 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-11-19 10:49:09 -0800 |
commit | cbdcc1d5f321cfff3d4d3f416e48733089de7e00 (patch) | |
tree | 5d44f3a1fdb3d48326566126eca8e31729f6db90 /deps/v8/src/profile-generator.cc | |
parent | f11291a220136164294e3cac5f09efd6c2b21be6 (diff) | |
download | node-new-cbdcc1d5f321cfff3d4d3f416e48733089de7e00.tar.gz |
Upgrade V8 to 2.5.7
Diffstat (limited to 'deps/v8/src/profile-generator.cc')
-rw-r--r-- | deps/v8/src/profile-generator.cc | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/deps/v8/src/profile-generator.cc b/deps/v8/src/profile-generator.cc index a4d9a828dd..29f9ab4d35 100644 --- a/deps/v8/src/profile-generator.cc +++ b/deps/v8/src/profile-generator.cc @@ -1848,22 +1848,6 @@ HeapEntry* HeapSnapshotGenerator::GetEntry(Object* obj) { } -int HeapSnapshotGenerator::GetGlobalSecurityToken() { - return collection_->token_enumerator()->GetTokenId( - Top::context()->global()->global_context()->security_token()); -} - - -int HeapSnapshotGenerator::GetObjectSecurityToken(HeapObject* obj) { - if (obj->IsGlobalContext()) { - return collection_->token_enumerator()->GetTokenId( - Context::cast(obj)->security_token()); - } else { - return TokenEnumerator::kNoSecurityToken; - } -} - - class IndexedReferencesExtractor : public ObjectVisitor { public: IndexedReferencesExtractor(HeapSnapshotGenerator* generator, @@ -1893,19 +1877,11 @@ class IndexedReferencesExtractor : public ObjectVisitor { void HeapSnapshotGenerator::ExtractReferences(HeapObject* obj) { // We need to reference JS global objects from snapshot's root. - // We also need to only include global objects from the current - // security context. And we don't want to add the global proxy, - // as we don't have a special type for it. + // We use JSGlobalProxy because this is what embedder (e.g. browser) + // uses for the global object. if (obj->IsJSGlobalProxy()) { - int global_security_token = GetGlobalSecurityToken(); JSGlobalProxy* proxy = JSGlobalProxy::cast(obj); - int object_security_token = - collection_->token_enumerator()->GetTokenId( - Context::cast(proxy->context())->security_token()); - if (object_security_token == TokenEnumerator::kNoSecurityToken - || object_security_token == global_security_token) { - SetRootReference(proxy->map()->prototype()); - } + SetRootReference(proxy->map()->prototype()); return; } |