| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 if (!v8listener->hasExistingListenerObject()) | 67 if (!v8listener->hasExistingListenerObject()) |
| 68 continue; | 68 continue; |
| 69 | 69 |
| 70 isolate->SetReference(wrapper, v8::Persistent<v8::Value>::Cast(v8listene
r->existingListenerObjectPersistentHandle())); | 70 isolate->SetReference(wrapper, v8::Persistent<v8::Value>::Cast(v8listene
r->existingListenerObjectPersistentHandle())); |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 | 73 |
| 74 Node* V8GCController::opaqueRootForGC(v8::Isolate*, Node* node) | 74 Node* V8GCController::opaqueRootForGC(v8::Isolate*, Node* node) |
| 75 { | 75 { |
| 76 ASSERT(node); | 76 ASSERT(node); |
| 77 if (node->inShadowIncludingDocument()) { | 77 if (node->isConnected()) { |
| 78 Document& document = node->document(); | 78 Document& document = node->document(); |
| 79 if (HTMLImportsController* controller = document.importsController()) | 79 if (HTMLImportsController* controller = document.importsController()) |
| 80 return controller->master(); | 80 return controller->master(); |
| 81 return &document; | 81 return &document; |
| 82 } | 82 } |
| 83 | 83 |
| 84 if (node->isAttributeNode()) { | 84 if (node->isAttributeNode()) { |
| 85 Node* ownerElement = toAttr(node)->ownerElement(); | 85 Node* ownerElement = toAttr(node)->ownerElement(); |
| 86 if (!ownerElement) | 86 if (!ownerElement) |
| 87 return node; | 87 return node; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scanPendingActivityHis
togram, new CustomCountHistogram("Blink.ScanPendingActivityDuration", 1, 1000, 5
0)); | 492 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scanPendingActivityHis
togram, new CustomCountHistogram("Blink.ScanPendingActivityDuration", 1, 1000, 5
0)); |
| 493 double startTime = WTF::currentTimeMS(); | 493 double startTime = WTF::currentTimeMS(); |
| 494 v8::HandleScope scope(isolate); | 494 v8::HandleScope scope(isolate); |
| 495 PendingActivityVisitor visitor(isolate, executionContext); | 495 PendingActivityVisitor visitor(isolate, executionContext); |
| 496 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); | 496 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); |
| 497 scanPendingActivityHistogram.count(static_cast<int>(WTF::currentTimeMS() - s
tartTime)); | 497 scanPendingActivityHistogram.count(static_cast<int>(WTF::currentTimeMS() - s
tartTime)); |
| 498 return visitor.pendingActivityFound(); | 498 return visitor.pendingActivityFound(); |
| 499 } | 499 } |
| 500 | 500 |
| 501 } // namespace blink | 501 } // namespace blink |
| OLD | NEW |