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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 AtomicallyInitializedStaticReference(WTF::ThreadSpecific<NonThrowableExcepti
onState>, exceptionState, new ThreadSpecific<NonThrowableExceptionState>); | 50 AtomicallyInitializedStaticReference(WTF::ThreadSpecific<NonThrowableExcepti
onState>, exceptionState, new ThreadSpecific<NonThrowableExceptionState>); |
51 return *exceptionState; | 51 return *exceptionState; |
52 } | 52 } |
53 | 53 |
54 Dictionary::Dictionary() | 54 Dictionary::Dictionary() |
55 : m_isolate(0) | 55 : m_isolate(0) |
56 , m_exceptionState(&emptyExceptionState()) | 56 , m_exceptionState(&emptyExceptionState()) |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 Dictionary::Dictionary(const v8::Handle<v8::Value>& options, v8::Isolate* isolat
e, ExceptionState& exceptionState) | 60 Dictionary::Dictionary(const v8::Local<v8::Value>& options, v8::Isolate* isolate
, ExceptionState& exceptionState) |
61 : m_options(options) | 61 : m_options(options) |
62 , m_isolate(isolate) | 62 , m_isolate(isolate) |
63 , m_exceptionState(&exceptionState) | 63 , m_exceptionState(&exceptionState) |
64 { | 64 { |
65 ASSERT(m_isolate); | 65 ASSERT(m_isolate); |
66 ASSERT(m_exceptionState); | 66 ASSERT(m_exceptionState); |
67 #if ENABLE(ASSERT) | 67 #if ENABLE(ASSERT) |
68 m_exceptionState->onStackObjectChecker().add(this); | 68 m_exceptionState->onStackObjectChecker().add(this); |
69 #endif | 69 #endif |
70 } | 70 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 { | 252 { |
253 exceptionState().throwTypeError(detail); | 253 exceptionState().throwTypeError(detail); |
254 } | 254 } |
255 | 255 |
256 bool Dictionary::toObject(v8::Local<v8::Object>& object) const | 256 bool Dictionary::toObject(v8::Local<v8::Object>& object) const |
257 { | 257 { |
258 return !isUndefinedOrNull() && m_options->ToObject(v8Context()).ToLocal(&obj
ect); | 258 return !isUndefinedOrNull() && m_options->ToObject(v8Context()).ToLocal(&obj
ect); |
259 } | 259 } |
260 | 260 |
261 } // namespace blink | 261 } // namespace blink |
OLD | NEW |