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

Side by Side Diff: Source/bindings/v8/V8Binding.cpp

Issue 19457002: Make 'any'-typed attributes of events available in isolated worlds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Properly refactored Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 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 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 return MainWorld; 532 return MainWorld;
533 } 533 }
534 534
535 DOMWrapperWorld* isolatedWorldForIsolate(v8::Isolate* isolate) 535 DOMWrapperWorld* isolatedWorldForIsolate(v8::Isolate* isolate)
536 { 536 {
537 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 537 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
538 if (data->workerDOMDataStore()) 538 if (data->workerDOMDataStore())
539 return 0; 539 return 0;
540 if (!DOMWrapperWorld::isolatedWorldsExist()) 540 if (!DOMWrapperWorld::isolatedWorldsExist())
541 return 0; 541 return 0;
542 ASSERT(!v8::Context::GetEntered().IsEmpty()); 542 ASSERT(v8::Context::InContext());
543 return DOMWrapperWorld::isolatedWorld(v8::Context::GetEntered()); 543 return DOMWrapperWorld::isolatedWorld(v8::Context::GetCurrent());
haraken 2013/07/18 00:00:29 Why did you make this change? I guess your new co
adamk 2013/07/18 01:09:14 I can't explain why the old code was using GetEnte
544 }
545
546 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate* isolate, Sc riptWrappable* wrappable, v8::Handle<v8::String> key)
547 {
548 v8::Local<v8::Object> wrapper = wrappable->newLocalWrapper(isolate);
549 return !wrapper.IsEmpty() ? wrapper->GetHiddenValue(key) : v8::Local<v8::Val ue>();
haraken 2013/07/18 00:00:29 Nit: I'd prefer: wrapper.Empty() ? v8::Local<v8::
adamk 2013/07/18 01:09:14 Will do on the next upload.
544 } 550 }
545 551
546 } // namespace WebCore 552 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698