Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 if (!v8listener->hasExistingListenerObject()) 71 if (!v8listener->hasExistingListenerObject())
72 continue; 72 continue;
73 73
74 isolate->SetReference(wrapper, v8::Persistent<v8::Value>::Cast(v8listene r->existingListenerObjectPersistentHandle())); 74 isolate->SetReference(wrapper, v8::Persistent<v8::Value>::Cast(v8listene r->existingListenerObjectPersistentHandle()));
75 } 75 }
76 } 76 }
77 77
78 Node* V8GCController::opaqueRootForGC(v8::Isolate*, Node* node) 78 Node* V8GCController::opaqueRootForGC(v8::Isolate*, Node* node)
79 { 79 {
80 ASSERT(node); 80 ASSERT(node);
81 if (node->inDocument()) { 81 if (node->inShadowIncludingDocument()) {
82 Document& document = node->document(); 82 Document& document = node->document();
83 if (HTMLImportsController* controller = document.importsController()) 83 if (HTMLImportsController* controller = document.importsController())
84 return controller->master(); 84 return controller->master();
85 return &document; 85 return &document;
86 } 86 }
87 87
88 if (node->isAttributeNode()) { 88 if (node->isAttributeNode()) {
89 Node* ownerElement = toAttr(node)->ownerElement(); 89 Node* ownerElement = toAttr(node)->ownerElement();
90 if (!ownerElement) 90 if (!ownerElement)
91 return node; 91 return node;
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scanPendingActivityHis togram, new CustomCountHistogram("Blink.ScanPendingActivityDuration", 1, 1000, 5 0)); 480 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scanPendingActivityHis togram, new CustomCountHistogram("Blink.ScanPendingActivityDuration", 1, 1000, 5 0));
481 double startTime = WTF::currentTimeMS(); 481 double startTime = WTF::currentTimeMS();
482 v8::HandleScope scope(isolate); 482 v8::HandleScope scope(isolate);
483 PendingActivityVisitor visitor(isolate, executionContext); 483 PendingActivityVisitor visitor(isolate, executionContext);
484 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); 484 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor);
485 scanPendingActivityHistogram.count(static_cast<int>(WTF::currentTimeMS() - s tartTime)); 485 scanPendingActivityHistogram.count(static_cast<int>(WTF::currentTimeMS() - s tartTime));
486 return visitor.pendingActivityFound(); 486 return visitor.pendingActivityFound();
487 } 487 }
488 488
489 } // namespace blink 489 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698