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

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

Issue 2713613003: Revert of DevTools: do not use RAII for sync native breakpoints, reuse AsyncTask where possible. (Closed)
Patch Set: Created 3 years, 9 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 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after
3190 return; 3190 return;
3191 } 3191 }
3192 3192
3193 if (!hasInsertionPoint) 3193 if (!hasInsertionPoint)
3194 open(enteredDocument, ASSERT_NO_EXCEPTION); 3194 open(enteredDocument, ASSERT_NO_EXCEPTION);
3195 3195
3196 DCHECK(m_parser); 3196 DCHECK(m_parser);
3197 PerformanceMonitor::reportGenericViolation( 3197 PerformanceMonitor::reportGenericViolation(
3198 this, PerformanceMonitor::kDiscouragedAPIUse, 3198 this, PerformanceMonitor::kDiscouragedAPIUse,
3199 "Avoid using document.write().", 0, nullptr); 3199 "Avoid using document.write().", 0, nullptr);
3200 InspectorInstrumentation::breakIfNeeded(this, "Document.write"); 3200 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
3201 this, "Document.write", true);
3201 m_parser->insert(text); 3202 m_parser->insert(text);
3202 } 3203 }
3203 3204
3204 void Document::write(const String& text, 3205 void Document::write(const String& text,
3205 Document* enteredDocument, 3206 Document* enteredDocument,
3206 ExceptionState& exceptionState) { 3207 ExceptionState& exceptionState) {
3207 write(SegmentedString(text), enteredDocument, exceptionState); 3208 write(SegmentedString(text), enteredDocument, exceptionState);
3208 } 3209 }
3209 3210
3210 void Document::writeln(const String& text, 3211 void Document::writeln(const String& text,
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
6616 } 6617 }
6617 6618
6618 void showLiveDocumentInstances() { 6619 void showLiveDocumentInstances() {
6619 WeakDocumentSet& set = liveDocumentSet(); 6620 WeakDocumentSet& set = liveDocumentSet();
6620 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6621 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6621 for (blink::Document* document : set) 6622 for (blink::Document* document : set)
6622 fprintf(stderr, "- Document %p URL: %s\n", document, 6623 fprintf(stderr, "- Document %p URL: %s\n", document,
6623 document->url().getString().utf8().data()); 6624 document->url().getString().utf8().data());
6624 } 6625 }
6625 #endif 6626 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698