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

Side by Side Diff: Source/core/loader/DocumentLoader.cpp

Issue 559553002: Merge ExecutionContextClient and ExecutionContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tmp1
Patch Set: Rebased Created 6 years, 3 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 | « Source/core/dom/SecurityContext.h ('k') | Source/core/loader/FrameLoader.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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 if (it != response.httpHeaderFields().end()) { 449 if (it != response.httpHeaderFields().end()) {
450 String content = it->value; 450 String content = it->value;
451 ASSERT(m_mainResource); 451 ASSERT(m_mainResource);
452 unsigned long identifier = mainResourceIdentifier(); 452 unsigned long identifier = mainResourceIdentifier();
453 ASSERT(identifier); 453 ASSERT(identifier);
454 if (frameLoader()->shouldInterruptLoadForXFrameOptions(content, response .url(), identifier)) { 454 if (frameLoader()->shouldInterruptLoadForXFrameOptions(content, response .url(), identifier)) {
455 InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, this, identifier, response); 455 InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, this, identifier, response);
456 String message = "Refused to display '" + response.url().elidedStrin g() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'."; 456 String message = "Refused to display '" + response.url().elidedStrin g() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'.";
457 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage:: create(SecurityMessageSource, ErrorMessageLevel, message); 457 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage:: create(SecurityMessageSource, ErrorMessageLevel, message);
458 consoleMessage->setRequestIdentifier(identifier); 458 consoleMessage->setRequestIdentifier(identifier);
459 frame()->document()->addMessage(consoleMessage.release()); 459 frame()->document()->addConsoleMessage(consoleMessage.release());
460 frame()->document()->enforceSandboxFlags(SandboxOrigin); 460 frame()->document()->enforceSandboxFlags(SandboxOrigin);
461 if (FrameOwner* owner = frame()->owner()) 461 if (FrameOwner* owner = frame()->owner())
462 owner->dispatchLoad(); 462 owner->dispatchLoad();
463 463
464 // The load event might have detached this frame. In that case, the load will already have been cancelled during detach. 464 // The load event might have detached this frame. In that case, the load will already have been cancelled during detach.
465 if (frameLoader()) 465 if (frameLoader())
466 cancelMainResourceLoad(ResourceError::cancelledError(m_request.u rl())); 466 cancelMainResourceLoad(ResourceError::cancelledError(m_request.u rl()));
467 return; 467 return;
468 } 468 }
469 } 469 }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L() 823 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L()
824 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument) 824 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument)
825 { 825 {
826 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true); 826 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true);
827 if (!source.isNull()) 827 if (!source.isNull())
828 m_writer->appendReplacingData(source); 828 m_writer->appendReplacingData(source);
829 endWriting(m_writer.get()); 829 endWriting(m_writer.get());
830 } 830 }
831 831
832 } // namespace blink 832 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/SecurityContext.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698