| Index: Source/core/dom/PendingScript.cpp
|
| diff --git a/Source/core/dom/PendingScript.cpp b/Source/core/dom/PendingScript.cpp
|
| index b448c8bd9bfd823a5d7255426a9dcd745171bb04..ec5e7a09d521081e58920ac22050f796dac6df5a 100644
|
| --- a/Source/core/dom/PendingScript.cpp
|
| +++ b/Source/core/dom/PendingScript.cpp
|
| @@ -35,7 +35,7 @@ PendingScript::~PendingScript()
|
| {
|
| }
|
|
|
| -PassRefPtr<Element> PendingScript::releaseElementAndClear()
|
| +PassRefPtrWillBeRawPtr<Element> PendingScript::releaseElementAndClear()
|
| {
|
| setScriptResource(0);
|
| m_watchingForLoad = false;
|
| @@ -52,4 +52,20 @@ void PendingScript::notifyFinished(Resource*)
|
| {
|
| }
|
|
|
| +void PendingScript::trace(Visitor* visitor)
|
| +{
|
| + // FIXME: Oilpan: this trace() is for a PendingScript that's not
|
| + // on the heap -- it is kept by script runner objects
|
| + // (ScriptRunner and HTMLScriptRunner), which are OwnPtr-kept by
|
| + // the document and the HTML document parser, respectively. The
|
| + // reason they are OwnPtrs and not on the heap themselves, is due
|
| + // to their need to finalize by using their hosts -- something
|
| + // that's not readily doable if both host and script runner object
|
| + // are heap allocated.
|
| + //
|
| + // Find a better arrangment, or at least clarify that this is the
|
| + // most practical way to handle such a dependency.
|
| + visitor->trace(m_element);
|
| +}
|
| +
|
| }
|
|
|