OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2147 ASSERT(v8Value->IsNumber()); | 2147 ASSERT(v8Value->IsNumber()); |
2148 int intValue = v8Value.As<v8::Integer>()->Value(); | 2148 int intValue = v8Value.As<v8::Integer>()->Value(); |
2149 return ScriptValue(scriptState(), v8::Integer::New(scriptState()->isolat
e(), intValue + 1)); | 2149 return ScriptValue(scriptState(), v8::Integer::New(scriptState()->isolat
e(), intValue + 1)); |
2150 } | 2150 } |
2151 }; | 2151 }; |
2152 | 2152 |
2153 } // namespace | 2153 } // namespace |
2154 | 2154 |
2155 ScriptPromise Internals::createResolvedPromise(ScriptState* scriptState, ScriptV
alue value) | 2155 ScriptPromise Internals::createResolvedPromise(ScriptState* scriptState, ScriptV
alue value) |
2156 { | 2156 { |
2157 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | 2157 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); |
2158 ScriptPromise promise = resolver->promise(); | 2158 ScriptPromise promise = resolver->promise(); |
2159 resolver->resolve(value); | 2159 resolver->resolve(value); |
2160 return promise; | 2160 return promise; |
2161 } | 2161 } |
2162 | 2162 |
2163 ScriptPromise Internals::createRejectedPromise(ScriptState* scriptState, ScriptV
alue value) | 2163 ScriptPromise Internals::createRejectedPromise(ScriptState* scriptState, ScriptV
alue value) |
2164 { | 2164 { |
2165 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | 2165 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); |
2166 ScriptPromise promise = resolver->promise(); | 2166 ScriptPromise promise = resolver->promise(); |
2167 resolver->reject(value); | 2167 resolver->reject(value); |
2168 return promise; | 2168 return promise; |
2169 } | 2169 } |
2170 | 2170 |
2171 ScriptPromise Internals::addOneToPromise(ScriptState* scriptState, ScriptPromise
promise) | 2171 ScriptPromise Internals::addOneToPromise(ScriptState* scriptState, ScriptPromise
promise) |
2172 { | 2172 { |
2173 return promise.then(AddOneFunction::createFunction(scriptState)); | 2173 return promise.then(AddOneFunction::createFunction(scriptState)); |
2174 } | 2174 } |
2175 | 2175 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 { | 2367 { |
2368 return new InternalsIterator; | 2368 return new InternalsIterator; |
2369 } | 2369 } |
2370 | 2370 |
2371 void Internals::forceBlinkGCWithoutV8GC() | 2371 void Internals::forceBlinkGCWithoutV8GC() |
2372 { | 2372 { |
2373 ThreadState::current()->scheduleGC(ThreadState::ForcedGC); | 2373 ThreadState::current()->scheduleGC(ThreadState::ForcedGC); |
2374 } | 2374 } |
2375 | 2375 |
2376 } // namespace blink | 2376 } // namespace blink |
OLD | NEW |