| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 class DOMRequestState { | 37 class DOMRequestState { |
| 38 public: | 38 public: |
| 39 explicit DOMRequestState(ExecutionContext* executionContext) | 39 explicit DOMRequestState(ExecutionContext* executionContext) |
| 40 : m_executionContext(executionContext) | 40 : m_executionContext(executionContext) |
| 41 , m_world(DOMWrapperWorld::current()) | 41 , m_world(DOMWrapperWorld::current()) |
| 42 , m_isolate(toIsolate(executionContext)) | 42 , m_isolate(toIsolate(executionContext)) |
| 43 { | 43 { |
| 44 } | 44 } |
| 45 | 45 |
| 46 DOMRequestState(ExecutionContext* executionContext, PassRefPtr<DOMWrapperWor
ld> world) |
| 47 : m_executionContext(executionContext) |
| 48 , m_world(world) |
| 49 , m_isolate(toIsolate(executionContext)) |
| 50 { |
| 51 } |
| 52 |
| 53 DOMRequestState(ExecutionContext* executionContext, DOMWrapperWorld* world) |
| 54 : m_executionContext(executionContext) |
| 55 , m_world(world) |
| 56 , m_isolate(toIsolate(executionContext)) |
| 57 { |
| 58 } |
| 59 |
| 46 void clear() | 60 void clear() |
| 47 { | 61 { |
| 48 m_executionContext = 0; | 62 m_executionContext = 0; |
| 49 m_world.clear(); | 63 m_world.clear(); |
| 50 } | 64 } |
| 51 | 65 |
| 52 class Scope { | 66 class Scope { |
| 53 public: | 67 public: |
| 54 explicit Scope(DOMRequestState& state) | 68 explicit Scope(DOMRequestState& state) |
| 55 : m_handleScope(state.isolate()) | 69 : m_handleScope(state.isolate()) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 72 } | 86 } |
| 73 | 87 |
| 74 private: | 88 private: |
| 75 ExecutionContext* m_executionContext; | 89 ExecutionContext* m_executionContext; |
| 76 RefPtr<DOMWrapperWorld> m_world; | 90 RefPtr<DOMWrapperWorld> m_world; |
| 77 v8::Isolate* m_isolate; | 91 v8::Isolate* m_isolate; |
| 78 }; | 92 }; |
| 79 | 93 |
| 80 } | 94 } |
| 81 #endif | 95 #endif |
| OLD | NEW |