| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include "bindings/core/v8/ScriptCallStack.h" | 30 #include "bindings/core/v8/ScriptCallStack.h" |
| 31 #include "core/dom/ActiveDOMObject.h" | 31 #include "core/dom/ActiveDOMObject.h" |
| 32 #include "core/dom/ExecutionContextTask.h" | 32 #include "core/dom/ExecutionContextTask.h" |
| 33 #include "core/events/ErrorEvent.h" | 33 #include "core/events/ErrorEvent.h" |
| 34 #include "core/events/EventTarget.h" | 34 #include "core/events/EventTarget.h" |
| 35 #include "core/fetch/MemoryCache.h" | 35 #include "core/fetch/MemoryCache.h" |
| 36 #include "core/frame/UseCounter.h" | 36 #include "core/frame/UseCounter.h" |
| 37 #include "core/html/PublicURLManager.h" | 37 #include "core/html/PublicURLManager.h" |
| 38 #include "core/inspector/InspectorInstrumentation.h" | 38 #include "core/inspector/InspectorInstrumentation.h" |
| 39 #include "core/origin_trials/OriginTrialContext.h" |
| 40 #include "core/origin_trials/OriginTrials.h" |
| 39 #include "core/workers/WorkerGlobalScope.h" | 41 #include "core/workers/WorkerGlobalScope.h" |
| 40 #include "core/workers/WorkerThread.h" | 42 #include "core/workers/WorkerThread.h" |
| 41 #include "platform/RuntimeEnabledFeatures.h" | 43 #include "platform/RuntimeEnabledFeatures.h" |
| 42 #include "wtf/MainThread.h" | 44 #include "wtf/MainThread.h" |
| 45 #include "wtf/PassOwnPtr.h" |
| 43 | 46 |
| 44 namespace blink { | 47 namespace blink { |
| 45 | 48 |
| 46 class ExecutionContext::PendingException { | 49 class ExecutionContext::PendingException { |
| 47 WTF_MAKE_NONCOPYABLE(PendingException); | 50 WTF_MAKE_NONCOPYABLE(PendingException); |
| 48 public: | 51 public: |
| 49 PendingException(const String& errorMessage, int lineNumber, int columnNumbe
r, int scriptId, const String& sourceURL, PassRefPtr<ScriptCallStack> callStack) | 52 PendingException(const String& errorMessage, int lineNumber, int columnNumbe
r, int scriptId, const String& sourceURL, PassRefPtr<ScriptCallStack> callStack) |
| 50 : m_errorMessage(errorMessage) | 53 : m_errorMessage(errorMessage) |
| 51 , m_lineNumber(lineNumber) | 54 , m_lineNumber(lineNumber) |
| 52 , m_columnNumber(columnNumber) | 55 , m_columnNumber(columnNumber) |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 202 |
| 200 int ExecutionContext::circularSequentialID() | 203 int ExecutionContext::circularSequentialID() |
| 201 { | 204 { |
| 202 ++m_circularSequentialID; | 205 ++m_circularSequentialID; |
| 203 if (m_circularSequentialID > ((1U << 31) - 1U)) | 206 if (m_circularSequentialID > ((1U << 31) - 1U)) |
| 204 m_circularSequentialID = 1; | 207 m_circularSequentialID = 1; |
| 205 | 208 |
| 206 return m_circularSequentialID; | 209 return m_circularSequentialID; |
| 207 } | 210 } |
| 208 | 211 |
| 212 OriginTrials* ExecutionContext::originTrials() |
| 213 { |
| 214 if (!m_originTrials) { |
| 215 m_originTrials = adoptPtr(new OriginTrials(originTrialContext())); |
| 216 } |
| 217 return m_originTrials.get(); |
| 218 } |
| 219 |
| 209 PublicURLManager& ExecutionContext::publicURLManager() | 220 PublicURLManager& ExecutionContext::publicURLManager() |
| 210 { | 221 { |
| 211 if (!m_publicURLManager) | 222 if (!m_publicURLManager) |
| 212 m_publicURLManager = PublicURLManager::create(this); | 223 m_publicURLManager = PublicURLManager::create(this); |
| 213 return *m_publicURLManager; | 224 return *m_publicURLManager; |
| 214 } | 225 } |
| 215 | 226 |
| 216 SecurityOrigin* ExecutionContext::securityOrigin() | 227 SecurityOrigin* ExecutionContext::securityOrigin() |
| 217 { | 228 { |
| 218 return securityContext().securityOrigin(); | 229 return securityContext().securityOrigin(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 DEFINE_TRACE(ExecutionContext) | 309 DEFINE_TRACE(ExecutionContext) |
| 299 { | 310 { |
| 300 #if ENABLE(OILPAN) | 311 #if ENABLE(OILPAN) |
| 301 visitor->trace(m_publicURLManager); | 312 visitor->trace(m_publicURLManager); |
| 302 HeapSupplementable<ExecutionContext>::trace(visitor); | 313 HeapSupplementable<ExecutionContext>::trace(visitor); |
| 303 #endif | 314 #endif |
| 304 ContextLifecycleNotifier::trace(visitor); | 315 ContextLifecycleNotifier::trace(visitor); |
| 305 } | 316 } |
| 306 | 317 |
| 307 } // namespace blink | 318 } // namespace blink |
| OLD | NEW |