| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 if (classId == WrapperTypeInfo::NodeClassId) { | 193 if (classId == WrapperTypeInfo::NodeClassId) { |
| 194 DCHECK(V8Node::hasInstance(wrapper, m_isolate)); | 194 DCHECK(V8Node::hasInstance(wrapper, m_isolate)); |
| 195 Node* node = V8Node::toImpl(wrapper); | 195 Node* node = V8Node::toImpl(wrapper); |
| 196 if (node->hasEventListeners()) | 196 if (node->hasEventListeners()) |
| 197 addReferencesForNodeWithEventListeners( | 197 addReferencesForNodeWithEventListeners( |
| 198 m_isolate, node, v8::Persistent<v8::Object>::Cast(*value)); | 198 m_isolate, node, v8::Persistent<v8::Object>::Cast(*value)); |
| 199 Node* root = V8GCController::opaqueRootForGC(m_isolate, node); | 199 Node* root = V8GCController::opaqueRootForGC(m_isolate, node); |
| 200 m_isolate->SetObjectGroupId( | 200 m_isolate->SetObjectGroupId( |
| 201 *value, v8::UniqueId(reinterpret_cast<intptr_t>(root))); | 201 *value, v8::UniqueId(reinterpret_cast<intptr_t>(root))); |
| 202 if (m_constructRetainedObjectInfos) | 202 if (m_constructRetainedObjectInfos) |
| 203 m_groupsWhichNeedRetainerInfo.append(root); | 203 m_groupsWhichNeedRetainerInfo.push_back(root); |
| 204 } else if (classId == WrapperTypeInfo::ObjectClassId) { | 204 } else if (classId == WrapperTypeInfo::ObjectClassId) { |
| 205 if (!RuntimeEnabledFeatures::traceWrappablesEnabled()) { | 205 if (!RuntimeEnabledFeatures::traceWrappablesEnabled()) { |
| 206 type->visitDOMWrapper(m_isolate, toScriptWrappable(wrapper), | 206 type->visitDOMWrapper(m_isolate, toScriptWrappable(wrapper), |
| 207 v8::Persistent<v8::Object>::Cast(*value)); | 207 v8::Persistent<v8::Object>::Cast(*value)); |
| 208 } | 208 } |
| 209 } else { | 209 } else { |
| 210 NOTREACHED(); | 210 NOTREACHED(); |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 | 213 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 double startTime = WTF::currentTimeMS(); | 543 double startTime = WTF::currentTimeMS(); |
| 544 v8::HandleScope scope(isolate); | 544 v8::HandleScope scope(isolate); |
| 545 PendingActivityVisitor visitor(isolate, executionContext); | 545 PendingActivityVisitor visitor(isolate, executionContext); |
| 546 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); | 546 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); |
| 547 scanPendingActivityHistogram.count( | 547 scanPendingActivityHistogram.count( |
| 548 static_cast<int>(WTF::currentTimeMS() - startTime)); | 548 static_cast<int>(WTF::currentTimeMS() - startTime)); |
| 549 return visitor.pendingActivityFound(); | 549 return visitor.pendingActivityFound(); |
| 550 } | 550 } |
| 551 | 551 |
| 552 } // namespace blink | 552 } // namespace blink |
| OLD | NEW |