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; |
285 auto nameString = name.As<v8::String>(); | 287 auto nameString = name.As<v8::String>(); |
286 DOMWindow* window = V8Window::toImpl(info.Holder()); | 288 DOMWindow* window = V8Window::toImpl(info.Holder()); |
287 if (!window) | 289 if (!window) |
288 return; | 290 return; |
289 | 291 |
290 Frame* frame = window->frame(); | 292 Frame* frame = window->frame(); |
291 // window is detached from a frame. | 293 // window is detached from a frame. |
292 if (!frame) | 294 if (!frame) |
293 return; | 295 return; |
294 | 296 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 if (items->hasExactlyOneItem()) { | 340 if (items->hasExactlyOneItem()) { |
339 v8SetReturnValueFast(info, items->item(0), window); | 341 v8SetReturnValueFast(info, items->item(0), window); |
340 return; | 342 return; |
341 } | 343 } |
342 v8SetReturnValueFast(info, items, window); | 344 v8SetReturnValueFast(info, items, window); |
343 return; | 345 return; |
344 } | 346 } |
345 } | 347 } |
346 | 348 |
347 } // namespace blink | 349 } // namespace blink |
OLD | NEW |