| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 ScriptValue* output) { | 52 ScriptValue* output) { |
| 53 Function* self = new Function(script_state, output); | 53 Function* self = new Function(script_state, output); |
| 54 return self->BindToV8Function(); | 54 return self->BindToV8Function(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 Function(ScriptState* script_state, ScriptValue* output) | 58 Function(ScriptState* script_state, ScriptValue* output) |
| 59 : ScriptFunction(script_state), output_(output) {} | 59 : ScriptFunction(script_state), output_(output) {} |
| 60 | 60 |
| 61 ScriptValue Call(ScriptValue value) override { | 61 ScriptValue Call(ScriptValue value) override { |
| 62 ASSERT(!value.IsEmpty()); | 62 DCHECK(!value.IsEmpty()); |
| 63 *output_ = value; | 63 *output_ = value; |
| 64 return value; | 64 return value; |
| 65 } | 65 } |
| 66 | 66 |
| 67 ScriptValue* output_; | 67 ScriptValue* output_; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 class TryCatchScope { | 70 class TryCatchScope { |
| 71 public: | 71 public: |
| 72 explicit TryCatchScope(v8::Isolate* isolate) | 72 explicit TryCatchScope(v8::Isolate* isolate) |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); | 360 v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); |
| 361 | 361 |
| 362 EXPECT_TRUE(on_fulfilled.IsEmpty()); | 362 EXPECT_TRUE(on_fulfilled.IsEmpty()); |
| 363 EXPECT_FALSE(on_rejected.IsEmpty()); | 363 EXPECT_FALSE(on_rejected.IsEmpty()); |
| 364 EXPECT_EQ("world", ToString(scope.GetContext(), on_rejected)); | 364 EXPECT_EQ("world", ToString(scope.GetContext(), on_rejected)); |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace | 367 } // namespace |
| 368 | 368 |
| 369 } // namespace blink | 369 } // namespace blink |
| OLD | NEW |