OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 Dictionary::Dictionary(const v8::Local<v8::Value>& options, v8::Isolate* isolate
, ExceptionState& exceptionState) | 58 Dictionary::Dictionary(const v8::Local<v8::Value>& options, v8::Isolate* isolate
, ExceptionState& exceptionState) |
59 : m_options(options) | 59 : m_options(options) |
60 , m_isolate(isolate) | 60 , m_isolate(isolate) |
61 , m_exceptionState(&exceptionState) | 61 , m_exceptionState(&exceptionState) |
62 { | 62 { |
63 ASSERT(m_isolate); | 63 ASSERT(m_isolate); |
64 ASSERT(m_exceptionState); | 64 ASSERT(m_exceptionState); |
65 #if ENABLE(ASSERT) | 65 #if ENABLE(ASSERT) |
66 m_exceptionState->onStackObjectChecker().add(this); | 66 m_exceptionState->getOnStackObjectChecker().add(this); |
67 #endif | 67 #endif |
68 } | 68 } |
69 | 69 |
70 Dictionary::~Dictionary() | 70 Dictionary::~Dictionary() |
71 { | 71 { |
72 #if ENABLE(ASSERT) | 72 #if ENABLE(ASSERT) |
73 if (m_exceptionState) | 73 if (m_exceptionState) |
74 m_exceptionState->onStackObjectChecker().remove(this); | 74 m_exceptionState->getOnStackObjectChecker().remove(this); |
75 #endif | 75 #endif |
76 } | 76 } |
77 | 77 |
78 Dictionary& Dictionary::operator=(const Dictionary& optionsObject) | 78 Dictionary& Dictionary::operator=(const Dictionary& optionsObject) |
79 { | 79 { |
80 m_options = optionsObject.m_options; | 80 m_options = optionsObject.m_options; |
81 m_isolate = optionsObject.m_isolate; | 81 m_isolate = optionsObject.m_isolate; |
82 #if ENABLE(ASSERT) | 82 #if ENABLE(ASSERT) |
83 if (m_exceptionState) | 83 if (m_exceptionState) |
84 m_exceptionState->onStackObjectChecker().remove(this); | 84 m_exceptionState->getOnStackObjectChecker().remove(this); |
85 #endif | 85 #endif |
86 m_exceptionState = optionsObject.m_exceptionState; | 86 m_exceptionState = optionsObject.m_exceptionState; |
87 #if ENABLE(ASSERT) | 87 #if ENABLE(ASSERT) |
88 if (m_exceptionState) | 88 if (m_exceptionState) |
89 m_exceptionState->onStackObjectChecker().add(this); | 89 m_exceptionState->getOnStackObjectChecker().add(this); |
90 #endif | 90 #endif |
91 return *this; | 91 return *this; |
92 } | 92 } |
93 | 93 |
94 bool Dictionary::isObject() const | 94 bool Dictionary::isObject() const |
95 { | 95 { |
96 return !isUndefinedOrNull() && m_options->IsObject(); | 96 return !isUndefinedOrNull() && m_options->IsObject(); |
97 } | 97 } |
98 | 98 |
99 bool Dictionary::isUndefinedOrNull() const | 99 bool Dictionary::isUndefinedOrNull() const |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 229 |
230 return true; | 230 return true; |
231 } | 231 } |
232 | 232 |
233 bool Dictionary::toObject(v8::Local<v8::Object>& object) const | 233 bool Dictionary::toObject(v8::Local<v8::Object>& object) const |
234 { | 234 { |
235 return !isUndefinedOrNull() && m_options->ToObject(v8Context()).ToLocal(&obj
ect); | 235 return !isUndefinedOrNull() && m_options->ToObject(v8Context()).ToLocal(&obj
ect); |
236 } | 236 } |
237 | 237 |
238 } // namespace blink | 238 } // namespace blink |
OLD | NEW |