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

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: same with unused assert removed - assert is trivial 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 3213 matching lines...) Expand 10 before | Expand all | Expand 10 after
3224 return; 3224 return;
3225 } 3225 }
3226 3226
3227 if (!hasInsertionPoint) 3227 if (!hasInsertionPoint)
3228 open(enteredDocument, ASSERT_NO_EXCEPTION); 3228 open(enteredDocument, ASSERT_NO_EXCEPTION);
3229 3229
3230 DCHECK(m_parser); 3230 DCHECK(m_parser);
3231 PerformanceMonitor::reportGenericViolation( 3231 PerformanceMonitor::reportGenericViolation(
3232 this, PerformanceMonitor::kDiscouragedAPIUse, 3232 this, PerformanceMonitor::kDiscouragedAPIUse,
3233 "Avoid using document.write().", 0, nullptr); 3233 "Avoid using document.write().", 0, nullptr);
3234 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 3234 InspectorInstrumentation::breakIfNeeded(this, "Document.write");
3235 this, "Document.write", true);
3236 m_parser->insert(text); 3235 m_parser->insert(text);
3237 } 3236 }
3238 3237
3239 void Document::write(const String& text, 3238 void Document::write(const String& text,
3240 Document* enteredDocument, 3239 Document* enteredDocument,
3241 ExceptionState& exceptionState) { 3240 ExceptionState& exceptionState) {
3242 write(SegmentedString(text), enteredDocument, exceptionState); 3241 write(SegmentedString(text), enteredDocument, exceptionState);
3243 } 3242 }
3244 3243
3245 void Document::writeln(const String& text, 3244 void Document::writeln(const String& text,
(...skipping 3406 matching lines...) Expand 10 before | Expand all | Expand 10 after
6652 } 6651 }
6653 6652
6654 void showLiveDocumentInstances() { 6653 void showLiveDocumentInstances() {
6655 WeakDocumentSet& set = liveDocumentSet(); 6654 WeakDocumentSet& set = liveDocumentSet();
6656 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6655 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6657 for (blink::Document* document : set) 6656 for (blink::Document* document : set)
6658 fprintf(stderr, "- Document %p URL: %s\n", document, 6657 fprintf(stderr, "- Document %p URL: %s\n", document,
6659 document->url().getString().utf8().data()); 6658 document->url().getString().utf8().data());
6660 } 6659 }
6661 #endif 6660 #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