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

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

Issue 2502843002: DevTools: issue document.write(script) violation reports. (Closed)
Patch Set: rebaselined Created 4 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 | « no previous file | third_party/WebKit/Source/core/frame/PerformanceMonitor.h » ('j') | 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 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 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after
3074 "It isn't possible to write into a document " 3074 "It isn't possible to write into a document "
3075 "from an asynchronously-loaded external " 3075 "from an asynchronously-loaded external "
3076 "script unless it is explicitly opened."))); 3076 "script unless it is explicitly opened.")));
3077 return; 3077 return;
3078 } 3078 }
3079 3079
3080 if (!hasInsertionPoint) 3080 if (!hasInsertionPoint)
3081 open(enteredDocument, ASSERT_NO_EXCEPTION); 3081 open(enteredDocument, ASSERT_NO_EXCEPTION);
3082 3082
3083 DCHECK(m_parser); 3083 DCHECK(m_parser);
3084 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
3085 this, "document.write", true);
3084 m_parser->insert(text); 3086 m_parser->insert(text);
3085 } 3087 }
3086 3088
3087 void Document::write(const String& text, 3089 void Document::write(const String& text,
3088 Document* enteredDocument, 3090 Document* enteredDocument,
3089 ExceptionState& exceptionState) { 3091 ExceptionState& exceptionState) {
3090 write(SegmentedString(text), enteredDocument, exceptionState); 3092 write(SegmentedString(text), enteredDocument, exceptionState);
3091 } 3093 }
3092 3094
3093 void Document::writeln(const String& text, 3095 void Document::writeln(const String& text,
(...skipping 3342 matching lines...) Expand 10 before | Expand all | Expand 10 after
6436 } 6438 }
6437 6439
6438 void showLiveDocumentInstances() { 6440 void showLiveDocumentInstances() {
6439 WeakDocumentSet& set = liveDocumentSet(); 6441 WeakDocumentSet& set = liveDocumentSet();
6440 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6442 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6441 for (Document* document : set) 6443 for (Document* document : set)
6442 fprintf(stderr, "- Document %p URL: %s\n", document, 6444 fprintf(stderr, "- Document %p URL: %s\n", document,
6443 document->url().getString().utf8().data()); 6445 document->url().getString().utf8().data());
6444 } 6446 }
6445 #endif 6447 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/PerformanceMonitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698