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

Side by Side Diff: Source/core/dom/ScriptRunner.cpp

Issue 1171463006: Make Timer and CancellableTaskFactory embeddeable in lazily swept objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: mark ScriptRunner's CancellableTaskFactory as needing unpoisoning Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/platform/Timer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 namespace blink { 45 namespace blink {
46 46
47 47
48 ScriptRunner::ScriptRunner(Document* document) 48 ScriptRunner::ScriptRunner(Document* document)
49 : m_document(document) 49 : m_document(document)
50 , m_executeScriptsTaskFactory(WTF::bind(&ScriptRunner::executeScripts, this) ) 50 , m_executeScriptsTaskFactory(WTF::bind(&ScriptRunner::executeScripts, this) )
51 { 51 {
52 ASSERT(document); 52 ASSERT(document);
53 #if ENABLE(LAZY_SWEEPING) && defined(ADDRESS_SANITIZER)
54 m_executeScriptsTaskFactory.setUnpoisonBeforeUpdate();
55 #endif
53 } 56 }
54 57
55 ScriptRunner::~ScriptRunner() 58 ScriptRunner::~ScriptRunner()
56 { 59 {
57 #if !ENABLE(OILPAN) 60 #if !ENABLE(OILPAN)
58 // Make sure that ScriptLoaders don't keep their PendingScripts alive. 61 // Make sure that ScriptLoaders don't keep their PendingScripts alive.
59 for (ScriptLoader* scriptLoader : m_scriptsToExecuteInOrder) 62 for (ScriptLoader* scriptLoader : m_scriptsToExecuteInOrder)
60 scriptLoader->detach(); 63 scriptLoader->detach();
61 for (ScriptLoader* scriptLoader : m_scriptsToExecuteSoon) 64 for (ScriptLoader* scriptLoader : m_scriptsToExecuteSoon)
62 scriptLoader->detach(); 65 scriptLoader->detach();
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 { 235 {
233 #if ENABLE(OILPAN) 236 #if ENABLE(OILPAN)
234 visitor->trace(m_document); 237 visitor->trace(m_document);
235 visitor->trace(m_scriptsToExecuteInOrder); 238 visitor->trace(m_scriptsToExecuteInOrder);
236 visitor->trace(m_scriptsToExecuteSoon); 239 visitor->trace(m_scriptsToExecuteSoon);
237 visitor->trace(m_pendingAsyncScripts); 240 visitor->trace(m_pendingAsyncScripts);
238 #endif 241 #endif
239 } 242 }
240 243
241 } 244 }
OLDNEW
« no previous file with comments | « no previous file | Source/platform/Timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698