| 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 26 matching lines...) Expand all Loading... |
| 37 class DOMRequestState { | 37 class DOMRequestState { |
| 38 public: | 38 public: |
| 39 explicit DOMRequestState(ExecutionContext* executionContext) | 39 explicit DOMRequestState(ExecutionContext* executionContext) |
| 40 : m_isolate(toIsolate(executionContext)) | 40 : m_isolate(toIsolate(executionContext)) |
| 41 , m_executionContext(executionContext) | 41 , m_executionContext(executionContext) |
| 42 , m_world(DOMWrapperWorld::current(m_isolate)) | 42 , m_world(DOMWrapperWorld::current(m_isolate)) |
| 43 { | 43 { |
| 44 ASSERT(m_executionContext); | 44 ASSERT(m_executionContext); |
| 45 } | 45 } |
| 46 | 46 |
| 47 DOMRequestState(ExecutionContext* executionContext, PassRefPtr<DOMWrapperWor
ld> world) |
| 48 : m_executionContext(executionContext) |
| 49 , m_world(world) |
| 50 , m_isolate(toIsolate(executionContext)) |
| 51 { |
| 52 } |
| 53 |
| 54 DOMRequestState(ExecutionContext* executionContext, DOMWrapperWorld* world) |
| 55 : m_executionContext(executionContext) |
| 56 , m_world(world) |
| 57 , m_isolate(toIsolate(executionContext)) |
| 58 { |
| 59 } |
| 60 |
| 47 void clear() | 61 void clear() |
| 48 { | 62 { |
| 49 m_executionContext = 0; | 63 m_executionContext = 0; |
| 50 m_world.clear(); | 64 m_world.clear(); |
| 51 } | 65 } |
| 52 | 66 |
| 53 class Scope { | 67 class Scope { |
| 54 public: | 68 public: |
| 55 explicit Scope(DOMRequestState& state) | 69 explicit Scope(DOMRequestState& state) |
| 56 : m_handleScope(state.isolate()) | 70 : m_handleScope(state.isolate()) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 76 bool isValid() const { return m_executionContext; } | 90 bool isValid() const { return m_executionContext; } |
| 77 | 91 |
| 78 private: | 92 private: |
| 79 v8::Isolate* m_isolate; | 93 v8::Isolate* m_isolate; |
| 80 ExecutionContext* m_executionContext; | 94 ExecutionContext* m_executionContext; |
| 81 RefPtr<DOMWrapperWorld> m_world; | 95 RefPtr<DOMWrapperWorld> m_world; |
| 82 }; | 96 }; |
| 83 | 97 |
| 84 } | 98 } |
| 85 #endif | 99 #endif |
| OLD | NEW |