Home | History | Annotate | Download | only in templates

Lines Matching defs:info

4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.name}}", "{{interface_name}}", info.Holder(), info.GetIsolate());
12 if (UNLIKELY(info.Length() < {{method.number_of_required_arguments}})) {
18 {{cpp_class}}* impl = {{v8_class}}::toNative(info.Holder());
27 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
35 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->frame(), exceptionState)) {
41 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->{{method.name}}(exceptionState), exceptionState)) {
42 v8SetReturnValueNull(info);
69 addHiddenValueToArray(info.Holder(), info[1], {{v8_class}}::eventListenerCacheIndex, info.GetIsolate());
71 removeHiddenValueFromArray(info.Holder(), info[1], {{v8_class}}::eventListenerCacheIndex, info.GetIsolate());
119 if (UNLIKELY(info.Length() <= {{argument.index}})) {
134 if (info.Length() > {{argument.index}} && {% if argument.is_nullable %}!isUndefinedOrNull(info[{{argument.index}}]) && {% endif %}!V8{{argument.idl_type}}::hasInstance(info[{{argument.index}}], info.GetIsolate())) {
144 {{argument.name}} = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[1], false, ListenerFindOnly);
146 {{argument.name}} = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[1], false, ListenerFindOrCreate);
152 if (info.Length() > {{argument.index}} && !isUndefinedOrNull(info[{{argument.index}}])) {
153 if (!info[{{argument.index}}]->IsFunction()) {
159 {{argument.name}} = V8{{argument.idl_type}}::create(v8::Handle<v8::Function>::Cast(info[{{argument.index}}]), ScriptState::current(info.GetIsolate()));
162 if (info.Length() <= {{argument.index}} || !{% if argument.is_nullable %}(info[{{argument.index}}]->IsFunction() || info[{{argument.index}}]->IsNull()){% else %}info[{{argument.index}}]->IsFunction(){% endif %}) {
168 {{argument.name}} = {% if argument.is_nullable %}info[{{argument.index}}]->IsNull() ? nullptr : {% endif %}V8{{argument.idl_type}}::create(v8::Handle<v8::Function>::Cast(info[{{argument.index}}]), ScriptState::current(info.GetIsolate()));
174 TONATIVE_VOID_INTERNAL({{argument.name}}NativeValue, info[{{argument.index}}]->NumberValue());
180 {{argument.name}} = SerializedScriptValue::create(info[{{argument.index}}], 0, 0, exceptionState, info.GetIsolate());
186 for (int i = {{argument.index}}; i < info.Length(); ++i) {
187 if (!V8{{argument.idl_type}}::hasInstance(info[i], info.GetIsolate())) {
192 {{argument.name}}.append(V8{{argument.idl_type}}::toNative(v8::Handle<v8::Object>::Cast(info[i])));
235 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
238 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
241 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(scriptState, info, {{method.number_of_arguments}}));
285 v8SetReturnValueNull(info);
295 throwTypeError(ExceptionMessages::failedToConstruct("{{interface_name}}", {{error_message}}), info.GetIsolate());
297 throwTypeError(ExceptionMessages::failedToExecute("{{method.name}}", "{{interface_name}}", {{error_message}}), info.GetIsolate());
312 throwArityTypeError(exceptionState, {{valid_arities}}, info.Length())
314 throwArityTypeErrorForConstructor("{{interface_name}}", {{valid_arities}}, info.Length(), info.GetIsolate())
316 throwArityTypeErrorForMethod("{{method.name}}", "{{interface_name}}", {{valid_arities}}, info.Length(), info.GetIsolate())
324 throwMinimumArityTypeError(exceptionState, {{number_of_required_arguments}}, info.Length())
326 throwMinimumArityTypeErrorForConstructor("{{interface_name}}", {{number_of_required_arguments}}, info.Length(), info.GetIsolate())
328 throwMinimumArityTypeErrorForMethod("{{method.name}}", "{{interface_name}}", {{number_of_required_arguments}}, info.Length(), info.GetIsolate())
335 static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
337 v8::Isolate* isolate = info.GetIsolate();
338 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{overloads.name}}", "{{interface_name}}", info.Holder(), isolate);
347 switch (std::min({{overloads.maxarg}}, info.Length())) {
363 {{method.name}}{{method.overload_index}}Method{{world_suffix}}(info
374 if (info.Length() >= {{overloads.minarg}}) {
375 throwArityTypeError(exceptionState, "{{overloads.valid_arities}}", info.Length());
380 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{overloads.minarg}}, info.Length()));
394 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
399 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as}});
402 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
406 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
413 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0)
415 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
416 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.data());
420 {{v8_class}}::{{method.name}}MethodCustom(info);
422 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info);
432 static void {{method.name}}OriginSafeMethodGetter{{world_suffix}}(const v8::PropertyCallbackInfo<v8::Value>& info)
437 v8::Isolate* isolate = info.GetIsolate();
443 v8::Handle<v8::Object> holder = {{v8_class}}::findInstanceInPrototypeChain(info.This(), isolate);
447 v8SetReturnValue(info, privateTemplate->GetFunction());
454 v8SetReturnValue(info, sharedTemplate->GetFunction());
458 {# The findInstanceInPrototypeChain() call above only returns a non-empty handle if info.This() is an Object. #}
459 v8::Local<v8::Value> hiddenValue = v8::Handle<v8::Object>::Cast(info.This())->GetHiddenValue(v8AtomicString(isolate, "{{method.name}}"));
461 v8SetReturnValue(info, hiddenValue);
465 v8SetReturnValue(info, privateTemplate->GetFunction());
468 static void {{method.name}}OriginSafeMethodGetterCallback{{world_suffix}}(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
471 {{cpp_class}}V8Internal::{{method.name}}OriginSafeMethodGetter{{world_suffix}}(info);
479 static void constructor{{constructor.overload_index}}(const v8::FunctionCallbackInfo<v8::Value>& info)
481 v8::Isolate* isolate = info.GetIsolate();
483 ExceptionState exceptionState(ExceptionState::ConstructionContext, "{{interface_name}}", info.Holder(), isolate);
488 if (UNLIKELY(info.Length() < {{interface_length}})) {
516 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), isolate);
521 v8::Handle<v8::Object> wrapper = info.Holder();
524 v8SetReturnValue(info, wrapper);
530 static void {{v8_class}}ConstructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
532 v8::Isolate* isolate = info.GetIsolate();
533 if (!info.IsConstructCall()) {
539 v8SetReturnValue(info, info.Holder());
549 toV8(documentPtr, info.Holder(), isolate);
552 ExceptionState exceptionState(ExceptionState::ConstructionContext, "{{interface_name}}", info.Holder(), isolate);
555 if (UNLIKELY(info.Length() < {{constructor.number_of_required_arguments}})) {