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

Side by Side Diff: Source/WebCore/dom/ScriptElement.cpp

Issue 8361008: Workaround 75604 for m15 (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk
Patch Set: speeling fix Created 9 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 dispatchErrorEvent(); 324 dispatchErrorEvent();
325 else if (!cachedScript->wasCanceled()) { 325 else if (!cachedScript->wasCanceled()) {
326 executeScript(ScriptSourceCode(cachedScript)); 326 executeScript(ScriptSourceCode(cachedScript));
327 dispatchLoadEvent(); 327 dispatchLoadEvent();
328 } 328 }
329 cachedScript->removeClient(this); 329 cachedScript->removeClient(this);
330 } 330 }
331 331
332 void ScriptElement::notifyFinished(CachedResource* o) 332 void ScriptElement::notifyFinished(CachedResource* o)
333 { 333 {
334 // crbug.com/75604 causes double notification in some situations, disregardi ng the second notification
335 // is a workaround.
336 if (!m_cachedScript)
337 return;
338
334 ASSERT(!m_willBeParserExecuted); 339 ASSERT(!m_willBeParserExecuted);
335 ASSERT_UNUSED(o, o == m_cachedScript); 340 ASSERT_UNUSED(o, o == m_cachedScript);
336 if (m_willExecuteInOrder) 341 if (m_willExecuteInOrder)
337 m_element->document()->scriptRunner()->notifyInOrderScriptReady(); 342 m_element->document()->scriptRunner()->notifyInOrderScriptReady();
338 else 343 else
339 m_element->document()->scriptRunner()->queueScriptForExecution(this, m_c achedScript, ScriptRunner::ASYNC_EXECUTION); 344 m_element->document()->scriptRunner()->queueScriptForExecution(this, m_c achedScript, ScriptRunner::ASYNC_EXECUTION);
340 345
341 #if PLATFORM(CHROMIUM) 346 #if PLATFORM(CHROMIUM)
342 ASSERT(m_cachedScriptState == Set); 347 ASSERT(m_cachedScriptState == Set);
343 m_cachedScriptState = ZeroedInNotifyFinished; 348 m_cachedScriptState = ZeroedInNotifyFinished;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 407
403 #if ENABLE(SVG) 408 #if ENABLE(SVG)
404 if (element->isSVGElement() && element->hasTagName(SVGNames::scriptTag)) 409 if (element->isSVGElement() && element->hasTagName(SVGNames::scriptTag))
405 return static_cast<SVGScriptElement*>(element); 410 return static_cast<SVGScriptElement*>(element);
406 #endif 411 #endif
407 412
408 return 0; 413 return 0;
409 } 414 }
410 415
411 } 416 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698