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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2700293002: DevTools: do not use RAII for sync native breakpoints, reuse AsyncTask where possible. (Closed)
Patch Set: Introduce progress monitor Created 3 years, 10 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
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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after
3176 return; 3176 return;
3177 } 3177 }
3178 3178
3179 if (!hasInsertionPoint) 3179 if (!hasInsertionPoint)
3180 open(enteredDocument, ASSERT_NO_EXCEPTION); 3180 open(enteredDocument, ASSERT_NO_EXCEPTION);
3181 3181
3182 DCHECK(m_parser); 3182 DCHECK(m_parser);
3183 PerformanceMonitor::reportGenericViolation( 3183 PerformanceMonitor::reportGenericViolation(
3184 this, PerformanceMonitor::kDiscouragedAPIUse, 3184 this, PerformanceMonitor::kDiscouragedAPIUse,
3185 "Avoid using document.write().", 0, nullptr); 3185 "Avoid using document.write().", 0, nullptr);
3186 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 3186 InspectorInstrumentation::breakIfNeeded(this, "Document.write");
3187 this, "Document.write", true);
3188 m_parser->insert(text); 3187 m_parser->insert(text);
3189 } 3188 }
3190 3189
3191 void Document::write(const String& text, 3190 void Document::write(const String& text,
3192 Document* enteredDocument, 3191 Document* enteredDocument,
3193 ExceptionState& exceptionState) { 3192 ExceptionState& exceptionState) {
3194 write(SegmentedString(text), enteredDocument, exceptionState); 3193 write(SegmentedString(text), enteredDocument, exceptionState);
3195 } 3194 }
3196 3195
3197 void Document::writeln(const String& text, 3196 void Document::writeln(const String& text,
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
6603 } 6602 }
6604 6603
6605 void showLiveDocumentInstances() { 6604 void showLiveDocumentInstances() {
6606 WeakDocumentSet& set = liveDocumentSet(); 6605 WeakDocumentSet& set = liveDocumentSet();
6607 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6606 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6608 for (blink::Document* document : set) 6607 for (blink::Document* document : set)
6609 fprintf(stderr, "- Document %p URL: %s\n", document, 6608 fprintf(stderr, "- Document %p URL: %s\n", document,
6610 document->url().getString().utf8().data()); 6609 document->url().getString().utf8().data());
6611 } 6610 }
6612 #endif 6611 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698