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

Side by Side Diff: Source/bindings/v8/ScriptController.cpp

Issue 20890003: Limit console messages' automatic collection of parser state. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline "fast/frames/sandboxed-iframe-autofocus-denied.html" Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 void ScriptController::namedItemRemoved(HTMLDocument* doc, const AtomicString& n ame) 575 void ScriptController::namedItemRemoved(HTMLDocument* doc, const AtomicString& n ame)
576 { 576 {
577 windowShell(mainThreadNormalWorld())->namedItemRemoved(doc, name); 577 windowShell(mainThreadNormalWorld())->namedItemRemoved(doc, name);
578 } 578 }
579 579
580 bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso n) 580 bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso n)
581 { 581 {
582 if (m_frame->document() && m_frame->document()->isSandboxed(SandboxScripts)) { 582 if (m_frame->document() && m_frame->document()->isSandboxed(SandboxScripts)) {
583 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. 583 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
584 if (reason == AboutToExecuteScript) 584 if (reason == AboutToExecuteScript)
585 m_frame->document()->addConsoleMessage(SecurityMessageSource, ErrorM essageLevel, "Blocked script execution in '" + m_frame->document()->url().elided String() + "' because the document's frame is sandboxed and the 'allow-scripts' permission is not set."); 585 m_frame->document()->addConsoleMessage(SecurityMessageSource, ErrorM essageLevel, "Blocked script execution in '" + m_frame->document()->url().elided String() + "' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.", 0, ForceParserStateCollection);
586 return false; 586 return false;
587 } 587 }
588 588
589 if (m_frame->document() && m_frame->document()->isViewSource()) { 589 if (m_frame->document() && m_frame->document()->isViewSource()) {
590 ASSERT(m_frame->document()->securityOrigin()->isUnique()); 590 ASSERT(m_frame->document()->securityOrigin()->isUnique());
591 return true; 591 return true;
592 } 592 }
593 593
594 Settings* settings = m_frame->settings(); 594 Settings* settings = m_frame->settings();
595 const bool allowed = m_frame->loader()->client()->allowScript(settings && se ttings->isScriptEnabled()); 595 const bool allowed = m_frame->loader()->client()->allowScript(settings && se ttings->isScriptEnabled());
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 v8Results = evaluateHandleScope.Close(resultArray); 708 v8Results = evaluateHandleScope.Close(resultArray);
709 } 709 }
710 710
711 if (results && !v8Results.IsEmpty()) { 711 if (results && !v8Results.IsEmpty()) {
712 for (size_t i = 0; i < v8Results->Length(); ++i) 712 for (size_t i = 0; i < v8Results->Length(); ++i)
713 results->append(ScriptValue(v8Results->Get(i))); 713 results->append(ScriptValue(v8Results->Get(i)));
714 } 714 }
715 } 715 }
716 716
717 } // namespace WebCore 717 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-9-expected.txt ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698