OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 return true; | 275 return true; |
276 } | 276 } |
277 } | 277 } |
278 } | 278 } |
279 } | 279 } |
280 return false; | 280 return false; |
281 } | 281 } |
282 | 282 |
283 void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 283 void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
284 { | 284 { |
285 if (!name->IsString()) | |
286 return; | |
287 auto nameString = name.As<v8::String>(); | 285 auto nameString = name.As<v8::String>(); |
288 DOMWindow* window = V8Window::toImpl(info.Holder()); | 286 DOMWindow* window = V8Window::toImpl(info.Holder()); |
289 if (!window) | 287 if (!window) |
290 return; | 288 return; |
291 | 289 |
292 Frame* frame = window->frame(); | 290 Frame* frame = window->frame(); |
293 // window is detached from a frame. | 291 // window is detached from a frame. |
294 if (!frame) | 292 if (!frame) |
295 return; | 293 return; |
296 | 294 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 if (items->hasExactlyOneItem()) { | 338 if (items->hasExactlyOneItem()) { |
341 v8SetReturnValueFast(info, items->item(0), window); | 339 v8SetReturnValueFast(info, items->item(0), window); |
342 return; | 340 return; |
343 } | 341 } |
344 v8SetReturnValueFast(info, items, window); | 342 v8SetReturnValueFast(info, items, window); |
345 return; | 343 return; |
346 } | 344 } |
347 } | 345 } |
348 | 346 |
349 } // namespace blink | 347 } // namespace blink |
OLD | NEW |