| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(v8::Isolate* isol
ate, const char* type, unsigned expected, unsigned provided) | 87 v8::Local<v8::Value> createMinimumArityTypeErrorForConstructor(v8::Isolate* isol
ate, const char* type, unsigned expected, unsigned provided) |
| 88 { | 88 { |
| 89 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oConstruct(type, ExceptionMessages::notEnoughArguments(expected, provided))); | 89 return V8ThrowException::createTypeError(isolate, ExceptionMessages::failedT
oConstruct(type, ExceptionMessages::notEnoughArguments(expected, provided))); |
| 90 } | 90 } |
| 91 | 91 |
| 92 void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected,
unsigned provided) | 92 void setMinimumArityTypeError(ExceptionState& exceptionState, unsigned expected,
unsigned provided) |
| 93 { | 93 { |
| 94 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected
, provided)); | 94 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(expected
, provided)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 PassRefPtrWillBeRawPtr<NodeFilter> toNodeFilter(v8::Local<v8::Value> callback, v
8::Local<v8::Object> creationContext, ScriptState* scriptState) | 97 RawPtr<NodeFilter> toNodeFilter(v8::Local<v8::Value> callback, v8::Local<v8::Obj
ect> creationContext, ScriptState* scriptState) |
| 98 { | 98 { |
| 99 if (callback->IsNull()) | 99 if (callback->IsNull()) |
| 100 return nullptr; | 100 return nullptr; |
| 101 RefPtrWillBeRawPtr<NodeFilter> filter = NodeFilter::create(); | 101 RawPtr<NodeFilter> filter = NodeFilter::create(); |
| 102 | 102 |
| 103 v8::Local<v8::Value> filterWrapper = toV8(filter.get(), creationContext, scr
iptState->isolate()); | 103 v8::Local<v8::Value> filterWrapper = toV8(filter.get(), creationContext, scr
iptState->isolate()); |
| 104 if (filterWrapper.IsEmpty()) | 104 if (filterWrapper.IsEmpty()) |
| 105 return nullptr; | 105 return nullptr; |
| 106 | 106 |
| 107 RefPtrWillBeRawPtr<NodeFilterCondition> condition = V8NodeFilterCondition::c
reate(callback, filterWrapper.As<v8::Object>(), scriptState); | 107 RawPtr<NodeFilterCondition> condition = V8NodeFilterCondition::create(callba
ck, filterWrapper.As<v8::Object>(), scriptState); |
| 108 filter->setCondition(condition.release()); | 108 filter->setCondition(condition.release()); |
| 109 | 109 |
| 110 return filter.release(); | 110 return filter.release(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool toBooleanSlow(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionSt
ate& exceptionState) | 113 bool toBooleanSlow(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionSt
ate& exceptionState) |
| 114 { | 114 { |
| 115 ASSERT(!value->IsBoolean()); | 115 ASSERT(!value->IsBoolean()); |
| 116 v8::TryCatch block(isolate); | 116 v8::TryCatch block(isolate); |
| 117 bool result = false; | 117 bool result = false; |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 { | 959 { |
| 960 v8::Local<v8::Value> data = info.Data(); | 960 v8::Local<v8::Value> data = info.Data(); |
| 961 ASSERT(data->IsExternal()); | 961 ASSERT(data->IsExternal()); |
| 962 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 962 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
| 963 if (!perContextData) | 963 if (!perContextData) |
| 964 return; | 964 return; |
| 965 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 965 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
| 966 } | 966 } |
| 967 | 967 |
| 968 } // namespace blink | 968 } // namespace blink |
| OLD | NEW |