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

Side by Side Diff: src/handles.cc

Issue 234913003: Allow allocation and GC in access check callbacks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added TODOs, addressed comments Created 6 years, 8 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
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 FixedArray::AddKeysFromJSArray( 450 FixedArray::AddKeysFromJSArray(
451 content, Handle<JSArray>::cast(names)), 451 content, Handle<JSArray>::cast(names)),
452 FixedArray); 452 FixedArray);
453 break; 453 break;
454 } 454 }
455 455
456 Handle<JSObject> current(JSObject::cast(*p), isolate); 456 Handle<JSObject> current(JSObject::cast(*p), isolate);
457 457
458 // Check access rights if required. 458 // Check access rights if required.
459 if (current->IsAccessCheckNeeded() && 459 if (current->IsAccessCheckNeeded() &&
460 !isolate->MayNamedAccessWrapper(current, 460 !isolate->MayNamedAccess(
461 isolate->factory()->undefined_value(), 461 current, isolate->factory()->undefined_value(), v8::ACCESS_KEYS)) {
462 v8::ACCESS_KEYS)) { 462 isolate->ReportFailedAccessCheck(current, v8::ACCESS_KEYS);
463 isolate->ReportFailedAccessCheckWrapper(current, v8::ACCESS_KEYS);
464 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray); 463 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray);
465 break; 464 break;
466 } 465 }
467 466
468 // Compute the element keys. 467 // Compute the element keys.
469 Handle<FixedArray> element_keys = 468 Handle<FixedArray> element_keys =
470 isolate->factory()->NewFixedArray(current->NumberOfEnumElements()); 469 isolate->factory()->NewFixedArray(current->NumberOfEnumElements());
471 current->GetEnumElementKeys(*element_keys); 470 current->GetEnumElementKeys(*element_keys);
472 ASSIGN_RETURN_ON_EXCEPTION( 471 ASSIGN_RETURN_ON_EXCEPTION(
473 isolate, content, 472 isolate, content,
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 Handle<Code> code) { 693 Handle<Code> code) {
695 heap->EnsureWeakObjectToCodeTable(); 694 heap->EnsureWeakObjectToCodeTable();
696 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); 695 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object));
697 dep = DependentCode::Insert(dep, DependentCode::kWeakCodeGroup, code); 696 dep = DependentCode::Insert(dep, DependentCode::kWeakCodeGroup, code);
698 CALL_HEAP_FUNCTION_VOID(heap->isolate(), 697 CALL_HEAP_FUNCTION_VOID(heap->isolate(),
699 heap->AddWeakObjectToCodeDependency(*object, *dep)); 698 heap->AddWeakObjectToCodeDependency(*object, *dep));
700 } 699 }
701 700
702 701
703 } } // namespace v8::internal 702 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698