| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 return; | 514 return; |
| 515 // FIXME: Consider passing StringImpl directly. | 515 // FIXME: Consider passing StringImpl directly. |
| 516 AtomicString name = toCoreAtomicString(property.As<v8::String>()); | 516 AtomicString name = toCoreAtomicString(property.As<v8::String>()); |
| 517 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder()); | 517 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder()); |
| 518 ASSERT(htmlDocument); | 518 ASSERT(htmlDocument); |
| 519 v8::Local<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hold
er(), info.GetIsolate()); | 519 v8::Local<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hold
er(), info.GetIsolate()); |
| 520 if (!result.IsEmpty()) { | 520 if (!result.IsEmpty()) { |
| 521 v8SetReturnValue(info, result); | 521 v8SetReturnValue(info, result); |
| 522 return; | 522 return; |
| 523 } | 523 } |
| 524 v8::Local<v8::Value> prototype = info.Holder()->GetPrototype(); | 524 v8::Local<v8::Value> value; |
| 525 if (prototype->IsObject()) { | 525 if (info.Holder()->GetRealNamedPropertyInPrototypeChain(info.GetIsolate()->G
etCurrentContext(), property.As<v8::String>()).ToLocal(&value)) |
| 526 v8::Local<v8::Value> value; | 526 v8SetReturnValue(info, value); |
| 527 if (prototype.As<v8::Object>()->Get(info.GetIsolate()->GetCurrentContext
(), property).ToLocal(&value)) | |
| 528 v8SetReturnValue(info, value); | |
| 529 } | |
| 530 } | 527 } |
| 531 | 528 |
| 532 void WindowProxy::namedItemAdded(HTMLDocument* document, const AtomicString& nam
e) | 529 void WindowProxy::namedItemAdded(HTMLDocument* document, const AtomicString& nam
e) |
| 533 { | 530 { |
| 534 ASSERT(m_world->isMainWorld()); | 531 ASSERT(m_world->isMainWorld()); |
| 535 | 532 |
| 536 if (!isContextInitialized() || !m_scriptState->contextIsValid()) | 533 if (!isContextInitialized() || !m_scriptState->contextIsValid()) |
| 537 return; | 534 return; |
| 538 | 535 |
| 539 ScriptState::Scope scope(m_scriptState.get()); | 536 ScriptState::Scope scope(m_scriptState.get()); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 562 } | 559 } |
| 563 | 560 |
| 564 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 561 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
| 565 { | 562 { |
| 566 if (!isContextInitialized()) | 563 if (!isContextInitialized()) |
| 567 return; | 564 return; |
| 568 setSecurityToken(origin); | 565 setSecurityToken(origin); |
| 569 } | 566 } |
| 570 | 567 |
| 571 } // namespace blink | 568 } // namespace blink |
| OLD | NEW |