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

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

Issue 419203004: DevTools: wrapping arguments addConsoleMessage in ConsoleMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@wrap-not-all-console-args
Patch Set: Created 6 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
« no previous file with comments | « no previous file | Source/core/css/MediaList.cpp » ('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) 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 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso n) 495 bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso n)
496 { 496 {
497 // For performance reasons, we check isInPrivateScriptIsolateWorld() only if 497 // For performance reasons, we check isInPrivateScriptIsolateWorld() only if
498 // canExecuteScripts is going to return false. 498 // canExecuteScripts is going to return false.
499 499
500 if (m_frame->document() && m_frame->document()->isSandboxed(SandboxScripts)) { 500 if (m_frame->document() && m_frame->document()->isSandboxed(SandboxScripts)) {
501 if (isInPrivateScriptIsolateWorld(m_isolate)) 501 if (isInPrivateScriptIsolateWorld(m_isolate))
502 return true; 502 return true;
503 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. 503 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
504 if (reason == AboutToExecuteScript) 504 if (reason == AboutToExecuteScript)
505 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."); 505 m_frame->document()->addConsoleMessage(ConsoleMessage::create(Securi tyMessageSource, ErrorMessageLevel, "Blocked script execution in '" + m_frame->d ocument()->url().elidedString() + "' because the document's frame is sandboxed a nd the 'allow-scripts' permission is not set."));
506 return false; 506 return false;
507 } 507 }
508 508
509 if (m_frame->document() && m_frame->document()->isViewSource()) { 509 if (m_frame->document() && m_frame->document()->isViewSource()) {
510 ASSERT(m_frame->document()->securityOrigin()->isUnique()); 510 ASSERT(m_frame->document()->securityOrigin()->isUnique());
511 return true; 511 return true;
512 } 512 }
513 513
514 Settings* settings = m_frame->settings(); 514 Settings* settings = m_frame->settings();
515 const bool allowed = m_frame->loader().client()->allowScript(settings && set tings->scriptEnabled()) 515 const bool allowed = m_frame->loader().client()->allowScript(settings && set tings->scriptEnabled())
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 resultArray->Set(i, evaluationResult); 635 resultArray->Set(i, evaluationResult);
636 } 636 }
637 637
638 if (results) { 638 if (results) {
639 for (size_t i = 0; i < resultArray->Length(); ++i) 639 for (size_t i = 0; i < resultArray->Length(); ++i)
640 results->append(handleScope.Escape(resultArray->Get(i))); 640 results->append(handleScope.Escape(resultArray->Get(i)));
641 } 641 }
642 } 642 }
643 643
644 } // namespace blink 644 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/MediaList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698