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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1615523002: Transitively keep track of an isolated world's children scripts and worlds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 1815
1816 FrameLoadRequest newRequest = request; 1816 FrameLoadRequest newRequest = request;
1817 FrameLoadType loadType = FrameLoadTypeStandard; 1817 FrameLoadType loadType = FrameLoadTypeStandard;
1818 if (childItem) { 1818 if (childItem) {
1819 newRequest = FrameLoadRequest(request.originDocument(), 1819 newRequest = FrameLoadRequest(request.originDocument(),
1820 FrameLoader::resourceRequestFromHistoryItem(childItem.get(), UseProt ocolCachePolicy)); 1820 FrameLoader::resourceRequestFromHistoryItem(childItem.get(), UseProt ocolCachePolicy));
1821 loadType = FrameLoadTypeInitialHistoryLoad; 1821 loadType = FrameLoadTypeInitialHistoryLoad;
1822 } 1822 }
1823 webframeChild->frame()->loader().load(newRequest, loadType, childItem.get()) ; 1823 webframeChild->frame()->loader().load(newRequest, loadType, childItem.get()) ;
1824 1824
1825 // Apply the creating worldId to the created child frame.
1826 if (v8::Isolate::GetCurrent()->InContext()) {
1827 RefPtr<DOMWrapperWorld> parentFrameOriginWorld = PassRefPtr<DOMWrapperWo rld>(DOMWrapperWorld::current(v8::Isolate::GetCurrent()).originWorld());
1828 ScriptState::forMainWorld(webframeChild->frame())->world().setOriginWorl d(parentFrameOriginWorld);
1829 }
1830
1825 // Note a synchronous navigation (about:blank) would have already processed 1831 // Note a synchronous navigation (about:blank) would have already processed
1826 // onload, so it is possible for the child frame to have already been 1832 // onload, so it is possible for the child frame to have already been
1827 // detached by script in the page. 1833 // detached by script in the page.
1828 if (!webframeChild->parent()) 1834 if (!webframeChild->parent())
1829 return nullptr; 1835 return nullptr;
1830 return webframeChild->frame(); 1836 return webframeChild->frame();
1831 } 1837 }
1832 1838
1833 void WebLocalFrameImpl::didChangeContentsSize(const IntSize& size) 1839 void WebLocalFrameImpl::didChangeContentsSize(const IntSize& size)
1834 { 1840 {
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 } 2267 }
2262 2268
2263 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2269 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2264 { 2270 {
2265 if (!frame()) 2271 if (!frame())
2266 return WebSandboxFlags::None; 2272 return WebSandboxFlags::None;
2267 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2273 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2268 } 2274 }
2269 2275
2270 } // namespace blink 2276 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698