OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 { | 257 { |
258 m_sandboxFlags |= mask; | 258 m_sandboxFlags |= mask; |
259 | 259 |
260 // The SandboxOrigin is stored redundantly in the security origin. | 260 // The SandboxOrigin is stored redundantly in the security origin. |
261 if (isSandboxed(SandboxOrigin) && securityContext().securityOrigin() && !sec urityContext().securityOrigin()->isUnique()) { | 261 if (isSandboxed(SandboxOrigin) && securityContext().securityOrigin() && !sec urityContext().securityOrigin()->isUnique()) { |
262 securityContext().setSecurityOrigin(SecurityOrigin::createUnique()); | 262 securityContext().setSecurityOrigin(SecurityOrigin::createUnique()); |
263 didUpdateSecurityOrigin(); | 263 didUpdateSecurityOrigin(); |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 void ExecutionContext::enforceSuborigin(const String& name) | |
268 { | |
269 if (name.isNull()) | |
Mike West
2014/10/23 12:59:18
isNull or isEmpty? Does enforcing an empty suborig
jww
2015/03/20 22:50:02
You're right, the proposed spec requires at least
| |
270 return; | |
271 SecurityOrigin* origin = securityContext().securityOrigin(); | |
272 ASSERT(origin); | |
273 if (!origin->hasSuborigin()) { | |
Mike West
2014/10/23 12:59:18
Should we do something other than fail silently if
jww
2015/03/20 22:50:02
This should probably be an assert that there eithe
| |
274 origin->addSuborigin(name); | |
275 didUpdateSecurityOrigin(); | |
276 } | |
277 } | |
278 | |
267 void ExecutionContext::trace(Visitor* visitor) | 279 void ExecutionContext::trace(Visitor* visitor) |
268 { | 280 { |
269 #if ENABLE(OILPAN) | 281 #if ENABLE(OILPAN) |
270 visitor->trace(m_pendingExceptions); | 282 visitor->trace(m_pendingExceptions); |
271 HeapSupplementable<ExecutionContext>::trace(visitor); | 283 HeapSupplementable<ExecutionContext>::trace(visitor); |
272 #endif | 284 #endif |
273 LifecycleContext<ExecutionContext>::trace(visitor); | 285 LifecycleContext<ExecutionContext>::trace(visitor); |
274 } | 286 } |
275 | 287 |
276 } // namespace blink | 288 } // namespace blink |
OLD | NEW |