| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 return V8ScriptRunner::instantiateObject(function, argc, argv); | 58 return V8ScriptRunner::instantiateObject(function, argc, argv); |
| 59 } | 59 } |
| 60 | 60 |
| 61 v8::Local<v8::Object> V8ObjectConstructor::newInstanceInDocument(v8::Handle<v8::
Function> function, int argc, v8::Handle<v8::Value> argv[], Document* document) | 61 v8::Local<v8::Object> V8ObjectConstructor::newInstanceInDocument(v8::Handle<v8::
Function> function, int argc, v8::Handle<v8::Value> argv[], Document* document) |
| 62 { | 62 { |
| 63 if (function.IsEmpty()) | 63 if (function.IsEmpty()) |
| 64 return v8::Local<v8::Object>(); | 64 return v8::Local<v8::Object>(); |
| 65 return V8ScriptRunner::instantiateObjectInDocument(function, document, argc,
argv); | 65 return V8ScriptRunner::instantiateObjectInDocument(function, document, argc,
argv); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void V8ObjectConstructor::isValidConstructorMode(const v8::FunctionCallbackInfo<
v8::Value>& args) | 68 void V8ObjectConstructor::isValidConstructorMode(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 69 { | 69 { |
| 70 if (ConstructorMode::current() == ConstructorMode::CreateNewObject) { | 70 if (ConstructorMode::current() == ConstructorMode::CreateNewObject) { |
| 71 throwTypeError("Illegal constructor", args.GetIsolate()); | 71 throwTypeError("Illegal constructor", info.GetIsolate()); |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 v8SetReturnValue(args, args.This()); | 74 v8SetReturnValue(info, info.This()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace WebCore | 77 } // namespace WebCore |
| OLD | NEW |