Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp

Issue 1853743005: Oilpan: Remove WillBe types (part 13) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 PassRefPtrWillBeRawPtr<NodeFilter> toNodeFilter(v8::Local<v8::Value> callback, v 8::Local<v8::Object> creationContext, ScriptState* scriptState) 95 RawPtr<NodeFilter> toNodeFilter(v8::Local<v8::Value> callback, v8::Local<v8::Obj ect> creationContext, ScriptState* scriptState)
96 { 96 {
97 if (callback->IsNull()) 97 if (callback->IsNull())
98 return nullptr; 98 return nullptr;
99 RefPtrWillBeRawPtr<NodeFilter> filter = NodeFilter::create(); 99 RawPtr<NodeFilter> filter = NodeFilter::create();
100 100
101 v8::Local<v8::Value> filterWrapper = toV8(filter.get(), creationContext, scr iptState->isolate()); 101 v8::Local<v8::Value> filterWrapper = toV8(filter.get(), creationContext, scr iptState->isolate());
102 if (filterWrapper.IsEmpty()) 102 if (filterWrapper.IsEmpty())
103 return nullptr; 103 return nullptr;
104 104
105 RefPtrWillBeRawPtr<NodeFilterCondition> condition = V8NodeFilterCondition::c reate(callback, filterWrapper.As<v8::Object>(), scriptState); 105 RawPtr<NodeFilterCondition> condition = V8NodeFilterCondition::create(callba ck, filterWrapper.As<v8::Object>(), scriptState);
106 filter->setCondition(condition.release()); 106 filter->setCondition(condition.release());
107 107
108 return filter.release(); 108 return filter.release();
109 } 109 }
110 110
111 bool toBooleanSlow(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionSt ate& exceptionState) 111 bool toBooleanSlow(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionSt ate& exceptionState)
112 { 112 {
113 ASSERT(!value->IsBoolean()); 113 ASSERT(!value->IsBoolean());
114 v8::TryCatch block(isolate); 114 v8::TryCatch block(isolate);
115 bool result = false; 115 bool result = false;
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 { 910 {
911 v8::Local<v8::Value> data = info.Data(); 911 v8::Local<v8::Value> data = info.Data();
912 ASSERT(data->IsExternal()); 912 ASSERT(data->IsExternal());
913 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); 913 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext());
914 if (!perContextData) 914 if (!perContextData)
915 return; 915 return;
916 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); 916 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
917 } 917 }
918 918
919 } // namespace blink 919 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698