| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include <v8.h> | 42 #include <v8.h> |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 void callback(const v8::FunctionCallbackInfo<v8::Value>& info) { } | 48 void callback(const v8::FunctionCallbackInfo<v8::Value>& info) { } |
| 49 | 49 |
| 50 class Function : public ScriptFunction { | 50 class Function : public ScriptFunction { |
| 51 public: | 51 public: |
| 52 static v8::Handle<v8::Function> createFunction(ScriptState* scriptState, Str
ing* value) | 52 static v8::Local<v8::Function> createFunction(ScriptState* scriptState, Stri
ng* value) |
| 53 { | 53 { |
| 54 Function* self = new Function(scriptState, value); | 54 Function* self = new Function(scriptState, value); |
| 55 return self->bindToV8Function(); | 55 return self->bindToV8Function(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 Function(ScriptState* scriptState, String* value) | 59 Function(ScriptState* scriptState, String* value) |
| 60 : ScriptFunction(scriptState) | 60 : ScriptFunction(scriptState) |
| 61 , m_value(value) | 61 , m_value(value) |
| 62 { | 62 { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 isolate()->RunMicrotasks(); | 258 isolate()->RunMicrotasks(); |
| 259 | 259 |
| 260 EXPECT_EQ(String(), onFulfilled); | 260 EXPECT_EQ(String(), onFulfilled); |
| 261 EXPECT_EQ("SyntaxError: some syntax error", onRejected); | 261 EXPECT_EQ("SyntaxError: some syntax error", onRejected); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace | 264 } // namespace |
| 265 | 265 |
| 266 } // namespace blink | 266 } // namespace blink |
| OLD | NEW |