summaryrefslogtreecommitdiff
path: root/deps/v8/src/profile-generator.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-11-19 10:49:09 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-11-19 10:49:09 -0800
commitcbdcc1d5f321cfff3d4d3f416e48733089de7e00 (patch)
tree5d44f3a1fdb3d48326566126eca8e31729f6db90 /deps/v8/src/profile-generator.cc
parentf11291a220136164294e3cac5f09efd6c2b21be6 (diff)
downloadnode-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.cc30
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;
}