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

Side by Side Diff: Source/bindings/v8/V8StringResource.h

Issue 335113002: IDL: Support argument default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 6 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
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/custom/V8HistoryCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 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 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 void operator=(v8::Handle<v8::Value> object) 183 void operator=(v8::Handle<v8::Value> object)
184 { 184 {
185 m_v8Object = object; 185 m_v8Object = object;
186 } 186 }
187 187
188 void operator=(const String& string) 188 void operator=(const String& string)
189 { 189 {
190 setString(string); 190 setString(string);
191 } 191 }
192 192
193 void operator=(std::nullptr_t)
194 {
195 setString(String());
196 }
197
193 bool prepare() 198 bool prepare()
194 { 199 {
195 if (m_v8Object.IsEmpty()) 200 if (m_v8Object.IsEmpty())
196 return true; 201 return true;
197 202
198 if (!isValid()) { 203 if (!isValid()) {
199 setString(String()); 204 setString(String());
200 return true; 205 return true;
201 } 206 }
202 207
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 260 }
256 261
257 template<> inline bool V8StringResource<WithUndefinedOrNullCheck>::isValid() con st 262 template<> inline bool V8StringResource<WithUndefinedOrNullCheck>::isValid() con st
258 { 263 {
259 return !m_v8Object->IsNull() && !m_v8Object->IsUndefined(); 264 return !m_v8Object->IsNull() && !m_v8Object->IsUndefined();
260 } 265 }
261 266
262 } // namespace WebCore 267 } // namespace WebCore
263 268
264 #endif // V8StringResource_h 269 #endif // V8StringResource_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/custom/V8HistoryCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698