OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
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 20 matching lines...) Expand all Loading... |
31 #include "V8Binding.h" | 31 #include "V8Binding.h" |
32 #include "v8.h" | 32 #include "v8.h" |
33 #include <wtf/RefPtr.h> | 33 #include <wtf/RefPtr.h> |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 class DOMRequestState { | 37 class DOMRequestState { |
38 public: | 38 public: |
39 explicit DOMRequestState(ScriptExecutionContext* scriptExecutionContext) | 39 explicit DOMRequestState(ScriptExecutionContext* scriptExecutionContext) |
40 : m_scriptExecutionContext(scriptExecutionContext) | 40 : m_scriptExecutionContext(scriptExecutionContext) |
41 , m_world(DOMWrapperWorld::current(scriptExecutionContext)) | 41 , m_world(DOMWrapperWorld::current()) |
42 { | 42 { |
43 } | 43 } |
44 | 44 |
45 void clear() | 45 void clear() |
46 { | 46 { |
47 m_scriptExecutionContext = 0; | 47 m_scriptExecutionContext = 0; |
48 m_world.clear(); | 48 m_world.clear(); |
49 } | 49 } |
50 | 50 |
51 class Scope { | 51 class Scope { |
(...skipping 12 matching lines...) Expand all Loading... |
64 return toV8Context(m_scriptExecutionContext, m_world.get()); | 64 return toV8Context(m_scriptExecutionContext, m_world.get()); |
65 } | 65 } |
66 | 66 |
67 private: | 67 private: |
68 ScriptExecutionContext* m_scriptExecutionContext; | 68 ScriptExecutionContext* m_scriptExecutionContext; |
69 RefPtr<DOMWrapperWorld> m_world; | 69 RefPtr<DOMWrapperWorld> m_world; |
70 }; | 70 }; |
71 | 71 |
72 } | 72 } |
73 #endif | 73 #endif |
OLD | NEW |