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

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

Issue 11320014: Merge 132371 - Crash when trying to write exception message to null console (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month 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 | « LayoutTests/fast/workers/worker-exception-during-navigation-expected.txt ('k') | 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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 5223 matching lines...) Expand 10 before | Expand all | Expand 10 after
5234 m_haveExplicitlyDisabledDNSPrefetch = true; 5234 m_haveExplicitlyDisabledDNSPrefetch = true;
5235 } 5235 }
5236 5236
5237 void Document::addMessage(MessageSource source, MessageType type, MessageLevel l evel, const String& message, const String& sourceURL, unsigned lineNumber, PassR efPtr<ScriptCallStack> callStack) 5237 void Document::addMessage(MessageSource source, MessageType type, MessageLevel l evel, const String& message, const String& sourceURL, unsigned lineNumber, PassR efPtr<ScriptCallStack> callStack)
5238 { 5238 {
5239 if (!isContextThread()) { 5239 if (!isContextThread()) {
5240 postTask(AddConsoleMessageTask::create(source, type, level, message)); 5240 postTask(AddConsoleMessageTask::create(source, type, level, message));
5241 return; 5241 return;
5242 } 5242 }
5243 5243
5244 if (DOMWindow* window = domWindow()) 5244 if (DOMWindow* window = domWindow()) {
5245 window->console()->addMessage(source, type, level, message, sourceURL, l ineNumber, callStack); 5245 if (Console* console = window->console())
5246 console->addMessage(source, type, level, message, sourceURL, lineNum ber, callStack);
5247 }
5246 } 5248 }
5247 5249
5248 struct PerformTaskContext { 5250 struct PerformTaskContext {
5249 WTF_MAKE_NONCOPYABLE(PerformTaskContext); WTF_MAKE_FAST_ALLOCATED; 5251 WTF_MAKE_NONCOPYABLE(PerformTaskContext); WTF_MAKE_FAST_ALLOCATED;
5250 public: 5252 public:
5251 PerformTaskContext(PassRefPtr<DocumentWeakReference> documentReference, Pass OwnPtr<ScriptExecutionContext::Task> task) 5253 PerformTaskContext(PassRefPtr<DocumentWeakReference> documentReference, Pass OwnPtr<ScriptExecutionContext::Task> task)
5252 : documentReference(documentReference) 5254 : documentReference(documentReference)
5253 , task(task) 5255 , task(task)
5254 { 5256 {
5255 } 5257 }
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
6395 AtomicString localeKey = locale; 6397 AtomicString localeKey = locale;
6396 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr olUIEnabled()) 6398 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr olUIEnabled())
6397 localeKey = defaultLanguage(); 6399 localeKey = defaultLanguage();
6398 LocaleToLocalizerMap::AddResult result = m_localizerCache.add(localeKey, nul lptr); 6400 LocaleToLocalizerMap::AddResult result = m_localizerCache.add(localeKey, nul lptr);
6399 if (result.isNewEntry) 6401 if (result.isNewEntry)
6400 result.iterator->second = Localizer::create(localeKey); 6402 result.iterator->second = Localizer::create(localeKey);
6401 return *(result.iterator->second); 6403 return *(result.iterator->second);
6402 } 6404 }
6403 6405
6404 } // namespace WebCore 6406 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/workers/worker-exception-during-navigation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698