params->Set(v8::Integer::New(isolate, 1), entry);
// FIXME(cmarcelo): ensure that trampoline is readonly.
- value.As<v8::Object>()->SetAccessor(
+ value.As<v8::Object>()->SetAccessor(context,
v8::String::NewFromUtf8(isolate, basename.c_str()),
TrampolineCallback, TrampolineSetterCallback, params);
return true;
return false;
}
- auto it = entry->entry_points.begin();
+ std::vector<std::string>::const_iterator it = entry->entry_points.begin();
for (; it != entry->entry_points.end(); ++it) {
ret = SetTrampolineAccessorForEntryPoint(context, *it, entry_ptr);
if (!ret) {
MarkModulesWithTrampoline();
- auto it = extension_modules_.begin();
+ ExtensionModules::iterator it = extension_modules_.begin();
for (; it != extension_modules_.end(); ++it) {
if (it->use_trampoline && InstallTrampoline(context, &*it))
continue;
void XWalkModuleSystem::LoadExtensionForTrampoline(
v8::Isolate* isolate,
v8::Local<v8::Value> data) {
+ v8::HandleScope handle_scope(isolate);
v8::Local<v8::Array> params = data.As<v8::Array>();
void* ptr = params->Get(
v8::Integer::New(isolate, 0)).As<v8::External>()->Value();
isolate,
module_system->require_native_template_);
-
XWalkExtensionModule* module = entry->module;
module->LoadExtensionCode(module_system->GetV8Context(),
require_native_template->GetFunction());
// static
void XWalkModuleSystem::TrampolineCallback(
- v8::Local<v8::String> property,
+ v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
XWalkModuleSystem::LoadExtensionForTrampoline(info.GetIsolate(), info.Data());
v8::Handle<v8::Value> holder = RefetchHolder(info.GetIsolate(), info.Data());
// static
void XWalkModuleSystem::TrampolineSetterCallback(
- v8::Local<v8::String> property,
+ v8::Local<v8::Name> property,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info) {
XWalkModuleSystem::LoadExtensionForTrampoline(info.GetIsolate(), info.Data());