8065291: Improved font lookups
authorprr
Thu, 18 Dec 2014 10:45:02 -0800
changeset 29907 1eff5aab118f
parent 29906 520942dee0f9
child 29908 83e2c403fefd
8065291: Improved font lookups Reviewed-by: bae, srl, mschoene
jdk/src/java.desktop/share/native/libfontmanager/layout/LookupProcessor.cpp
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/LookupProcessor.cpp	Thu Dec 18 10:43:02 2014 -0800
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/LookupProcessor.cpp	Thu Dec 18 10:45:02 2014 -0800
@@ -255,6 +255,7 @@
 
     if (requiredFeatureIndex != 0xFFFF) {
       requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success);
+      if (LE_FAILURE(success)) return;
       featureReferences += SWAPW(requiredFeatureTable->lookupCount);
     }
 
@@ -292,7 +293,7 @@
                 }
 
                 featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success);
-
+                if (LE_FAILURE(success)) continue;
                 if (featureTag == fm.tag) {
                   count += selectLookups(featureTable, fm.mask, order + count, success);
                 }
@@ -319,7 +320,7 @@
 #endif
 
                 featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success);
-
+                if (LE_FAILURE(success)) continue;
                 if (featureTag == fm.tag) {
                   order += selectLookups(featureTable, fm.mask, order, success);
                 }