Changeset 14631 for trunk


Ignore:
Timestamp:
11/16/12 23:21:27 (12 years ago)
Author:
tbretz
Message:
I assume that PrototypeTemplate() will never return an empty handle because no 'New' is involved.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/InterpreterV8.cc

    r14630 r14631  
    684684        Handle<Object> This = args.This();
    685685        if (!args.IsConstructCall())
    686         {
    687             Handle<ObjectTemplate> T = fTemplateDatabase->PrototypeTemplate();
    688             if (T.IsEmpty())
    689                 return Undefined();
    690 
    691             This = T->NewInstance();
    692         }
     686            This = fTemplateDatabase->PrototypeTemplate()->NewInstance();
    693687        if (This.IsEmpty())
    694688            return Undefined();
     
    13631357    Handle<Object> This = args.This();
    13641358    if (!args.IsConstructCall())
    1365     {
    1366         Handle<ObjectTemplate> T = fTemplateMoon->PrototypeTemplate();
    1367         if (T.IsEmpty())
    1368             return Undefined();
    1369 
    1370         This = T->NewInstance();
    1371     }
     1359        This = fTemplateMoon->PrototypeTemplate()->NewInstance();
    13721360    if (This.IsEmpty())
    13731361        return Undefined();
     
    14061394    Handle<Object> This = args.This();
    14071395    if (!args.IsConstructCall())
    1408     {
    1409         Handle<ObjectTemplate> T = fTemplateSky->PrototypeTemplate();
    1410         if (T.IsEmpty())
    1411             return Undefined();
    1412 
    1413         This = T->NewInstance();
    1414     }
     1396        This = fTemplateSky->PrototypeTemplate()->NewInstance();
    14151397    if (This.IsEmpty())
    14161398        return Undefined();
     
    14511433    Handle<Object> This = args.This();
    14521434    if (!args.IsConstructCall())
    1453     {
    1454         Handle<ObjectTemplate> T = fTemplateLocal->PrototypeTemplate();
    1455         if (T.IsEmpty())
    1456             return Undefined();
    1457 
    1458         This = T->NewInstance();
    1459     }
     1435        This = fTemplateLocal->PrototypeTemplate()->NewInstance();
    14601436    if (This.IsEmpty())
    14611437        return Undefined();
Note: See TracChangeset for help on using the changeset viewer.