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

Side by Side Diff: src/runtime.cc

Issue 23819003: Handlify JSObject::SetAccessor method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « src/objects.cc ('k') | no next file » | 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 8974 matching lines...) Expand 10 before | Expand all | Expand 10 after
8985 int index = description->index(j); 8985 int index = description->index(j);
8986 switch (mode) { 8986 switch (mode) {
8987 case VAR: 8987 case VAR:
8988 case LET: 8988 case LET:
8989 case CONST: 8989 case CONST:
8990 case CONST_HARMONY: { 8990 case CONST_HARMONY: {
8991 PropertyAttributes attr = 8991 PropertyAttributes attr =
8992 IsImmutableVariableMode(mode) ? FROZEN : SEALED; 8992 IsImmutableVariableMode(mode) ? FROZEN : SEALED;
8993 Handle<AccessorInfo> info = 8993 Handle<AccessorInfo> info =
8994 Accessors::MakeModuleExport(name, index, attr); 8994 Accessors::MakeModuleExport(name, index, attr);
8995 Handle<Object> result = SetAccessor(module, info); 8995 Handle<Object> result = JSObject::SetAccessor(module, info);
8996 ASSERT(!(result.is_null() || result->IsUndefined())); 8996 ASSERT(!(result.is_null() || result->IsUndefined()));
8997 USE(result); 8997 USE(result);
8998 break; 8998 break;
8999 } 8999 }
9000 case MODULE: { 9000 case MODULE: {
9001 Object* referenced_context = Context::cast(host_context)->get(index); 9001 Object* referenced_context = Context::cast(host_context)->get(index);
9002 Handle<JSModule> value(Context::cast(referenced_context)->module()); 9002 Handle<JSModule> value(Context::cast(referenced_context)->module());
9003 JSReceiver::SetProperty(module, name, value, FROZEN, kStrictMode); 9003 JSReceiver::SetProperty(module, name, value, FROZEN, kStrictMode);
9004 break; 9004 break;
9005 } 9005 }
(...skipping 5689 matching lines...) Expand 10 before | Expand all | Expand 10 after
14695 // Handle last resort GC and make sure to allow future allocations 14695 // Handle last resort GC and make sure to allow future allocations
14696 // to grow the heap without causing GCs (if possible). 14696 // to grow the heap without causing GCs (if possible).
14697 isolate->counters()->gc_last_resort_from_js()->Increment(); 14697 isolate->counters()->gc_last_resort_from_js()->Increment();
14698 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14698 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14699 "Runtime::PerformGC"); 14699 "Runtime::PerformGC");
14700 } 14700 }
14701 } 14701 }
14702 14702
14703 14703
14704 } } // namespace v8::internal 14704 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698