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

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

Issue 169303003: CSP 1.1: Revert CSSOM changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 6 years, 10 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/bindings/v8/V8Initializer.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.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, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (!installDOMWindow()) { 235 if (!installDOMWindow()) {
236 disposeContext(DoNotDetachGlobal); 236 disposeContext(DoNotDetachGlobal);
237 return false; 237 return false;
238 } 238 }
239 239
240 if (isMainWorld) { 240 if (isMainWorld) {
241 updateDocument(); 241 updateDocument();
242 if (m_frame->document()) { 242 if (m_frame->document()) {
243 setSecurityToken(m_frame->document()->securityOrigin()); 243 setSecurityToken(m_frame->document()->securityOrigin());
244 ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPol icy(); 244 ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPol icy();
245 context->AllowCodeGenerationFromStrings(csp->allowScriptEval(0, Cont entSecurityPolicy::SuppressReport)); 245 context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSec urityPolicy::SuppressReport));
246 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isol ate, csp->evalDisabledErrorMessage())); 246 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isol ate, csp->evalDisabledErrorMessage()));
247 } 247 }
248 } else { 248 } else {
249 // Using the default security token means that the canAccess is always 249 // Using the default security token means that the canAccess is always
250 // called, which is slow. 250 // called, which is slow.
251 // FIXME: Use tokens where possible. This will mean keeping track of all 251 // FIXME: Use tokens where possible. This will mean keeping track of all
252 // created contexts so that they can all be updated when the 252 // created contexts so that they can all be updated when the
253 // document domain 253 // document domain
254 // changes. 254 // changes.
255 context->UseDefaultSecurityToken(); 255 context->UseDefaultSecurityToken();
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 if (!isMainThread()) 517 if (!isMainThread())
518 return true; 518 return true;
519 // We're initializing the context, so it is not yet in a status where we can 519 // We're initializing the context, so it is not yet in a status where we can
520 // validate the context. 520 // validate the context.
521 if (contextBeingInitialized) 521 if (contextBeingInitialized)
522 return true; 522 return true;
523 return !!toDOMWindow(context); 523 return !!toDOMWindow(context);
524 } 524 }
525 525
526 } // WebCore 526 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Initializer.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698