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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
468 | 468 |
469 Frame* target = targetWindow->frame(); | 469 Frame* target = targetWindow->frame(); |
470 if (!target) | 470 if (!target) |
471 return false; | 471 return false; |
472 | 472 |
473 // Notify the loader's client if the initial document has been accessed. | 473 // Notify the loader's client if the initial document has been accessed. |
474 if (target->loader().stateMachine()->isDisplayingInitialEmptyDocument()) | 474 if (target->loader().stateMachine()->isDisplayingInitialEmptyDocument()) |
475 target->loader().didAccessInitialDocument(); | 475 target->loader().didAccessInitialDocument(); |
476 | 476 |
477 if (key->IsString()) { | 477 if (key->IsString()) { |
478 DEFINE_STATIC_LOCAL(AtomicString, nameOfProtoProperty, ("__proto__", Ato micString::ConstructFromLiteral)); | 478 DEFINE_STATIC_LOCAL(const AtomicString, nameOfProtoProperty, ("__proto__ ", AtomicString::ConstructFromLiteral)); |
Inactive
2013/11/27 01:11:41
Not strictly related but since I was editing this
| |
479 | 479 |
480 String name = toWebCoreString(key.As<v8::String>()); | 480 AtomicString name = toWebCoreAtomicString(key.As<v8::String>()); |
Inactive
2013/11/27 01:11:41
Note: This one is safe (cannot throw) as it takes
| |
481 Frame* childFrame = target->tree().scopedChild(name); | 481 Frame* childFrame = target->tree().scopedChild(name); |
482 // Notice that we can't call HasRealNamedProperty for ACCESS_HAS | 482 // Notice that we can't call HasRealNamedProperty for ACCESS_HAS |
483 // because that would generate infinite recursion. | 483 // because that would generate infinite recursion. |
484 if (type == v8::ACCESS_HAS && childFrame) | 484 if (type == v8::ACCESS_HAS && childFrame) |
485 return true; | 485 return true; |
486 // We need to explicitly compare against nameOfProtoProperty because | 486 // We need to explicitly compare against nameOfProtoProperty because |
487 // V8's JSObject::LocalLookup finds __proto__ before | 487 // V8's JSObject::LocalLookup finds __proto__ before |
488 // interceptors and even when __proto__ isn't a "real named property". | 488 // interceptors and even when __proto__ isn't a "real named property". |
489 v8::Handle<v8::String> keyString = key.As<v8::String>(); | 489 v8::Handle<v8::String> keyString = key.As<v8::String>(); |
490 if (type == v8::ACCESS_GET | 490 if (type == v8::ACCESS_GET |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 v8::Handle<v8::Context> context = frame->script().currentWorldContext(); | 561 v8::Handle<v8::Context> context = frame->script().currentWorldContext(); |
562 if (context.IsEmpty()) | 562 if (context.IsEmpty()) |
563 return v8Undefined(); | 563 return v8Undefined(); |
564 | 564 |
565 v8::Handle<v8::Object> global = context->Global(); | 565 v8::Handle<v8::Object> global = context->Global(); |
566 ASSERT(!global.IsEmpty()); | 566 ASSERT(!global.IsEmpty()); |
567 return global; | 567 return global; |
568 } | 568 } |
569 | 569 |
570 } // namespace WebCore | 570 } // namespace WebCore |
OLD | NEW |