OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(v8::Isolate* isol
ate, const char* type, unsigned expected, unsigned provided) | 85 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(v8::Isolate* isol
ate, const char* type, unsigned expected, unsigned provided) |
86 { | 86 { |
87 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oConstruct(type, ExceptionMessages::notEnoughArguments(expected, provided))); | 87 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oConstruct(type, ExceptionMessages::notEnoughArguments(expected, provided))); |
88 } | 88 } |
89 | 89 |
90 void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected,
unsigned provided) | 90 void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected,
unsigned provided) |
91 { | 91 { |
92 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected
, provided)); | 92 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected
, provided)); |
93 } | 93 } |
94 | 94 |
95 RawPtr<NodeFilter> toNodeFilter(v8::Local<v8::Value> callback, v8::Local<v8::Obj
ect> creationContext, ScriptState* scriptState) | 95 NodeFilter* toNodeFilter(v8::Local<v8::Value> callback, v8::Local<v8::Object> cr
eationContext, ScriptState* scriptState) |
96 { | 96 { |
97 if (callback->IsNull()) | 97 if (callback->IsNull()) |
98 return nullptr; | 98 return nullptr; |
99 NodeFilter* filter = NodeFilter::create(); | 99 NodeFilter* filter = NodeFilter::create(); |
100 | 100 |
101 v8::Local<v8::Value> filterWrapper = toV8(filter, creationContext, scriptSta
te->isolate()); | 101 v8::Local<v8::Value> filterWrapper = toV8(filter, creationContext, scriptSta
te->isolate()); |
102 if (filterWrapper.IsEmpty()) | 102 if (filterWrapper.IsEmpty()) |
103 return nullptr; | 103 return nullptr; |
104 | 104 |
105 NodeFilterCondition* condition = V8NodeFilterCondition::create(callback, fil
terWrapper.As<v8::Object>(), scriptState); | 105 NodeFilterCondition* condition = V8NodeFilterCondition::create(callback, fil
terWrapper.As<v8::Object>(), scriptState); |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 { | 914 { |
915 v8::Local<v8::Value> data = info.Data(); | 915 v8::Local<v8::Value> data = info.Data(); |
916 ASSERT(data->IsExternal()); | 916 ASSERT(data->IsExternal()); |
917 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 917 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
918 if (!perContextData) | 918 if (!perContextData) |
919 return; | 919 return; |
920 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 920 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
921 } | 921 } |
922 | 922 |
923 } // namespace blink | 923 } // namespace blink |
OLD | NEW |